Universal Robots Forum

Add Folder to the Root Tree

Hello everyone,

I’m trying to add a folder node directly under the root node in the tree but it’s always created under the last selected node.
This is the code that I use:

The result of that code is:

Tree%20Folder
I want to add the folder always under the Robot Program and not under the Ellipse function.
No matter what the selected position is.

Is there anyone with an idea to fix that?

Thanks in advance.

Hello,

The UR API does not support multiple instances of ‘parent nodes’ to the program tree, in other words you cannot traverse the parent node you are located in. You can only add or update child nodes, which is why the folder appears as a child of the Ellipse node.

In this case another parent node could be created similarly to how the Ellipse node was created. (similar to the existing folder function under the basic commands tab)