# Issue hiding shapeNodes in a folder via script

**URL:** <https://discourse.slicer.org/t/issue-hiding-shapenodes-in-a-folder-via-script/44023>\
**Category:** Support\
**Created:** [August 8, 2025, 1:16pm UTC](https://discourse.slicer.org/t/issue-hiding-shapenodes-in-a-folder-via-script/44023 "2025-08-08T13:16:58Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 11, 2025, 9:58am UTC](https://discourse.slicer.org/t/issue-hiding-shapenodes-in-a-folder-via-script/44023/8 "2025-08-11T09:58:07Z")

</div>

Please read this comment about how folder display node works

> [@How to add folder in scene?](https://discourse.slicer.org/t/how-to-add-folder-in-scene/29499/15):
>
> The folders have a special folder display node, but it is only created when you show/hide it in the Data module (you’ll notice because the color item will appear in its row). In theory you can create it programmatically, but as I see that function is not python wrapped. This is the code: pluginHandlerSingleton = slicer.qSlicerSubjectHierarchyPluginHandler.instance() folderPlugin = pluginHandlerSingleton.pluginByName('Folder') folderPlugin.createDisplayNodeForItem(folderItemID) If you need to c…

Is it possible that when you paste the code in the Python console you already clicked the show/hide of the folder in the Data module, but when you had done this from your module you hadn’t?

By the way please use the latest Slicer, we cannot really help with old versions. 5.6.2 is a year and a half old now, and there have been quite a lot of changes since then.

---

_[View the full topic](https://discourse.slicer.org/t/issue-hiding-shapenodes-in-a-folder-via-script/44023)._
