Create a move Node with external digital Input

Hello

I would like to program a URCap to set move Nodes with an external input (Hardware Button).
When I click the Button I get an Error. I need Your help to solve this Problem. I used the (com.jbm.urcap.sample.visionTemplate) as tamplate. Enclosed my Java code to create the move Node and a picture of the Alarm.

Thanks in advance.

Timo

As the node insert is from the template, it should be fine.

What is the calinput() method? Does it change the DataModel? What dous Stack Trace write?

If I had to guess, ther is something in calinput(), that changes the DataModel, that isn’t enclosed by an UndoRedoManager.

Thanks for help I have found the Error.
From the method cal input () I get a boolean, when it is true then it creates a Move Node.

But I have now the problem I must do the same for a waypoint.
When I create a Move Node I can’t create a waypoint below this. The Java Code is the same.

Need I am another root?
Need I am a return from create a Move Node?

The addChild() method adds the node to the program tree and returns with a TreeNode. Using the returned TreeNode, you can insert Waypoints under the Move node.