# The id and name of ThreeDWidget

**URL:** <https://discourse.slicer.org/t/the-id-and-name-of-threedwidget/26595>\
**Category:** Support\
**Created:** [December 6, 2022, 8:14am UTC](https://discourse.slicer.org/t/the-id-and-name-of-threedwidget/26595 "2022-12-06T08:14:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![f1oNae](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/f1onae/32/17418_2.png) [@f1oNae](https://discourse.slicer.org/u/f1oNae)\
**Post date:** [December 6, 2022, 8:14am UTC](https://discourse.slicer.org/t/the-id-and-name-of-threedwidget/26595/1 "2022-12-06T08:14:54Z")

</div>

I have created several 3dwidgets,and now I need to get ThreeDWidget.  
I can’t get ThreeDWidget in order.  
I get the name of ThreeDWidget first.The name doesn’t correspond to the ID.  
But when I try to get qMRMLThreeDWidget through names,it has no return value.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/e/4e53e37946e3650ea2ecbec10f2666c19f4c4878.png)  
The related source code of slicer as follows:  
[Slicer/Libs/MRML/Widgets/qMRMLLayoutManager.h at main · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/blob/main/Libs/MRML/Widgets/qMRMLLayoutManager.h#:~:text=///%20Get%203D,id))const%3B

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [December 6, 2022, 9:07am UTC](https://discourse.slicer.org/t/the-id-and-name-of-threedwidget/26595/2 "2022-12-06T09:07:54Z")

</div>

@f1oNae, have you tried with some of the snippets in the python script repository ([Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html))? More precisely, the snippets in this section may help you: [Access VTK rendering classes](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#access-vtk-rendering-classes).

Let us know if this does not help you.

---

<div class="post-metadata">

**Author:** ![f1oNae](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/f1onae/32/17418_2.png) [@f1oNae](https://discourse.slicer.org/u/f1oNae)\
**Post date:** [December 6, 2022, 9:20am UTC](https://discourse.slicer.org/t/the-id-and-name-of-threedwidget/26595/3 "2022-12-06T09:20:37Z")

</div>

yeah,I Iterate through all 3D views in current layout,finally find that the real name of the 3DWidget is “View1”-“View16” instead of “ThreeDWidgetX”!!!  
Thanks for your help!
