how do i insert a correct composite command, which will be accepted by the OLPCommands UI (Patheditor) in the correct way instead of just a plain text.
I simply tried to create a composite command by the following code.
private void insertCommand(TxRoboticCompositeCommand preCmd, double pos)
//insert WaitPaint before or change it
TxRoboticCompositeCommandStringElement strElement = new TxRoboticCompositeCommandStringElement();
strElement.Type = "CustomizedOLPName";
strElement.Value = "WaitPaintPosition";
TxRoboticCompositeCommandIntElement intElement = new TxRoboticCompositeCommandIntElement();
intElement.Type = "Position";
intElement.Value = Convert.ToInt16(pos);
ArrayList arrList = new ArrayList();
TxRoboticCompositeCommandCreationData data = new TxRoboticCompositeCommandCreationData(arrList);
TxRoboticCompositeCommand newCommand = comp.CreateCompositeCommand(data);
This works, but when i change it in the OLP commands UI, it is a plain text.
Is there something like the expression builder for commands?
Solved! Go to Solution.
Your command is probably created with the correct layers, but the OLP UI is a plain text. To correct that you must set the "Text" property of the the composite command (newCommand.Text).
Use a command that is correct to see how to define this text property. It is like a combination of the OLP dialogue name with an "ID" code (this ID looks to be "random", only thing that I checked is that same IDs creates grouped OLP commands)