Cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Operations

Creator
Creator

Hello all,

 

I have created two compound operations(suppose "RFirst" n "RSecond"). Now i want to move operations which are executed by RFirst robot to created compound operation "RFirst" and operations which are executed by RSecond robot created compound operation "RSecond".     

I am confused how can i get operations and then move operations.

 

Can u hep me?

4 REPLIES

Re: Moving Operations

Siemens Phenom Siemens Phenom
Siemens Phenom

HI,

 

You need to find first compoundOperation in Operation Tree than you will get all operations underneath as children.

This operations you can copy and paste under your second CompoundOperation.

Then at least you need to define your new robot for each operation.

e.g.

TxWeldOperation txWeldOperation = operation as TxWeldOperation;
txWeldOperation.Robot = selectedRobot;

Best regards

Patrick

Re: Moving Operations

Creator
Creator

Hi @PatrickUnangst,,,Thanx for your reply , But my Task is a bit different,

 

I created compound operation by this below given method. Each Compound operation is created according to the robots available in study.  Now Next step shoul be like 

1. >> Check in operation Tree , which operations are executed by which robot.

2.>> Once we get list of operations according to its resposible robot , Operations should move to responsible robot's compound   operation

 

private void RobotCompoundOperations()
        {
        TxObjectList robots = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(TxRobot)));
            foreach (TxRobot robot in robots)
            {
               TxCompoundOperationCreationData R = new TxCompoundOperationCreationData(robot.Name);
                TxApplication.ActiveDocument.OperationRoot.CreateCompoundOperation(R);
            }
        }
        public override void Execute(object cmdParams)
        {
            RobotCompoundOperations();
        }

 

Re: Moving Operations

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

txCompoundResource.AddObject(yourOp);

This should add your Op to the compoundOp.

 

First you need to check if your assigned robot name equals your compoundOp name, than add it.

 

Best regards

Patrick

Re: Moving Operations

Creator
Creator

Hi, @PatrickUnangst,

 

Thanx you very much. I have applied just your code and it works.