Is it possible to make the URCap Node "NonUserInsertable" after inserting it once?

Hello,

Is it possible to make the URCap Node “NonUserInsertable” after inserting it once ? Or do not insert it twice? Is there a way to check the Tree for the URCapNode and make the Button in the URCap Tab not functionable?

Ronny

I’m not 100% certain, but it seems unlikely that this will be possible. You would probably need to change the functionality of your node so that if it’s not the first instance to be inserted then it displays a message informing the user and doesn’t do anything else.

Ok I’ll try it. Thanks for the answer

@ajpI have another Question about the “NonUserinsertable” CapNodes… I want to set another UrCapNode in the ProgramTree after my Main UrcapNode isDefined(). I set the configuration.setUserInsertable to (false) in ProgramNodeService because it should not appear in the UrCaps Tab. But know i dont know how to set a new CapNode outside the MainUrcapTree. Is there a samplecap or something i can check?

You can only insert nodes as children of your own parent node.
Not anywhere else in the program tree.

so i have to write 2 Caps…or Change my rootTree.
OK thx

Dear UR developers. I would like to launch an idea, an option to implement this. Even it’s not the most important feature, but it seems easy and sometimes can be useful. It would be as simple as:

  • When an URCapNodeService returns null to, lets say, createView(), instead of throughing an error message, the system just doesn’t insert anything.

Alternatives:

  • instead of using the null value, adding a parameter to insert or skip the node.
  • I said createView(), but I think it sould be the first method that is called from the system on when inserting the node.

This would allow the URCap designer to have control over the number of nodes inserted.

What do you think?

1 Like