what’s the difference between TreeNode and ProgramNode
From the documentation on Universal Robots - URCap - API Reference Docs
Interface TreeNode
- @ProviderType public interface TreeNode
This interface represents a node in the program tree that can be used to construct a sub-tree rooted in a URCap program node.
Using the
ProgramModel.getRootTreeNode(ProgramNodeContribution)
to obtain a root for the sub-tree, it is possible to add children. For each call toaddChild(ProgramNode)
, a newTreeNode
is returned, that can, in turn, act as a root for yet another sub-tree.Interface ProgramNode
- All Known Subinterfaces:
AssignmentNode, CircleMoveNode, CommentNode, DirectionNode, ElseIfNode, ElseNode, FolderNode, ForceNode, GripperNode, HaltNode, IfNode, LoopNode, MoveNode, PalletNode, PopupNode, ScrewdrivingNode, SeekNode, SetNode, UntilNode, URCapProgramNode, WaitNode, WaypointNode
public interface ProgramNode
This interface represents PolyScope program nodes.
The program nodes can be created using
ProgramNodeFactory
.
So the TreeNode interface can be used to insert ProgramNodes instances to the program tree. You can take a look at the many samples that is adding child nodes.