Cancel
Showing results for 
Search instead for 
Did you mean: 

Modification in Operation Tree

Valued Contributor
Valued Contributor

Hello ,

 

I have created compound operations by getting robot list in study. Now Again One Problem,

In Operation Tree, All operations are mixed as you can see in attached pic.

public void CreateCompoundOperations(TxObjectList robots)
        {
            foreach(TxRobot robot in robots)
            {
                TxCompoundOperationCreationData data = new TxCompoundOperationCreationData(robot.Name);
                TxApplication.ActiveDocument.OperationRoot.CreateCompoundOperation(data);
            }
        }

After applying  code three Compound Operations are created(Last 3 in blue circle).  I want to move operations into particular compound operation. That means classification of operations and then suppose we get 3 operations which are executed by robot_1 then all 3 operations should move to Robot_1 compound operation.

Plz give me suggestion for that.

 

Thanx

2 REPLIES

Re: Modification in Operation Tree

Legend
Legend

@Vaghniku

 

You can filter operations by assigned robot (Robot property) and then add those robots in a new TxObjectList. Then, in your compound operation for that specific robot, use the Paste() method and pass the list of operations to move desired operations inside the compound operation.

 

Regards,

Re: Modification in Operation Tree

Valued Contributor
Valued Contributor

Hello @FredCastro,

 

Perfect..Thanx