Cancel
Showing results for 
Search instead for 
Did you mean: 

Operation creation

Pioneer
Pioneer

Hello All,

 

I want to create one compound operation for each robot available in production cell. 

For that first i get all robots by GetAllDescendants. But , how can i create one compound

operation by   "CreateCompoundOperation(new TxCompoundOperationCreationData()); "   for each robot and also created compound operation name should be same as robot name.

Can you help me in this task?

 

Thanx all,

 

2 REPLIES

Re: Operation creation

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi ChristyBell,

 

Here is an example:

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

Best Regards,

DianaG

Re: Operation creation

Pioneer
Pioneer

Super Thanx DianaG...It works