I’m facing big trouble on how to create waypoints in MoveNodes.
A short explanation of what has to be done by my URCap: I need to create MoveP and MoveJ Nodes with some of the digital inputs of the controller. For example, pushbutton 1 creates a MovePNode with 1 Waypoint. If pushbutton 2 is pressed, another waypoint should be created.
The URCap Node is inserted into the node tree by the operator.
As long as this view is open, the URCap will recognize changes to the digital inputs. After pushbutton 1 is pressed it looks like this:
So far so good. But i can’t find a way to create a waypoint by pressing pushbutton 2. The tree should look like this:
I’m really looking forward for your answers.
Thanks in advance,
It might help to take a look at this sample: Sample: Vision Template Builder
Src -> PickProgramNodeContribution.java
I would think that the code should look something like this:
TreeNode root = MoveP node
But check the out the API Reference for TreeNode/Program node and the sample.
Thank you for the hints.
Got it working.