# ignition.designer.model.DesignerContext

**URL:** <https://forum.inductiveautomation.com/t/ignition-designer-model-designercontext/6206>\
**Category:** Module Development\
**Created:** [April 11, 2013, 12:05pm UTC](https://forum.inductiveautomation.com/t/ignition-designer-model-designercontext/6206 "2013-04-11T12:05:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [April 11, 2013, 12:05pm UTC](https://forum.inductiveautomation.com/t/ignition-designer-model-designercontext/6206/1 "2013-04-11T12:05:32Z")

</div>

Hi,  
Can you give me more information on this method.

` addFolder
void addFolder(long newResourceId,
               java.lang.String moduleId,
               int scope,
               java.lang.String folderName,
               java.util.UUID parent)
Adds a new folder under the given parent. If there is already a child with the given name, the name will be automatically modified`

I can get the newResourceId from the context.GetLockManager().newRessourceId().  
I would like to know was is the moduleId and where it come from?  
I would like to have more information on the scope and how do you select the proper scope for your application?  
I would like to know where and how to you get the UUID of the parent node?

My goal is to add a folder in the project tree and open a workspace where I could enter a SQLtag path to be used by my gateway scope module.

thanks

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 25, 2013, 9:43pm UTC](https://forum.inductiveautomation.com/t/ignition-designer-model-designercontext/6206/2 "2013-04-25T21:43:10Z")

</div>

Hi there. Bad news & good news.

The bad news is that you’re doing it all wrong.

The good news is that the right way to do it is pretty easy. In your Designer module hook, you want to add a new node to the nav tree.

1. Create your workspace implementation, and register it using context.registerResourceWorkspace()
2. Make your node by creating a subclass of AbstractNavTreeNode. Make sure to override getWorkspaceName() to return the name of your workspace (this is what will automatically switch to your workspace when the node is selected)
3. Add your node using context.getProjectBrowserRoot().addChild()

---

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [May 4, 2013, 11:43am UTC](https://forum.inductiveautomation.com/t/ignition-designer-model-designercontext/6206/3 "2013-05-04T11:43:17Z")

</div>

Hi Carl

```
  To creat a workspace do I need to extent a class from one of these abstract class?
  [ul]AbstractDesignableWorkspace
  DefaultDesignableWorkspace[/ul]

  Thanks
```

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 10, 2013, 3:36pm UTC](https://forum.inductiveautomation.com/t/ignition-designer-model-designercontext/6206/4 "2013-05-10T15:36:13Z")

</div>

No, all you have to do is implement ResourceWorkspace.

AbstractDesignableWorkspace is useful for workspaces that need a drag-and-drop, WYSIWYG type interface.
