Cancel
Showing results for 
Search instead for 
Did you mean: 

How to get operation in operation tree

Pioneer
Pioneer

Hello,

 

plz refer attached pic. I want to get "STATION" exist under operation tree. I dont know which type it is. So i dont have any idea which filter type i should use. Can u give some suggestion? Thnx

TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(TxRobot)));
5 REPLIES

Betreff: How to get operation in operation tree

Legend
Legend

Hi,

you have to use OperationRoot instead of PhysicalRoot!

PhysicalRoot is the resource tree.

Betreff: How to get operation in operation tree

Pioneer
Pioneer

Thanks @MarkusH,

 

But which type filter i should use.....

TxApplication.ActiveDocument.OperationRoot.GetAllDescendants(new TxTypeFilter(typeof(_________))); 

There are many operatins under "STATION".... All opearions i dont want to get. I just want to get "STATION". But i dont know its type. Can u suggest me which type it is?

 

Thnax 

Betreff: How to get operation in operation tree

Legend
Legend

The filter could be ITxCompoundOperation.

But if you want only Station and not the subs of it, you should use GetDirectDescendants-Method instead.

Betreff: How to get operation in operation tree

Pioneer
Pioneer

Hello, @MarkusH

 

There are many compound operation under "STATION" . So when i add filter of TxCompoundOperation, it gives all compound operaton. But i think "STATION" is not compound operation.

 

Thnx

Betreff: How to get operation in operation tree

Legend
Legend

Hi,

 

why is station not a compound operation? Sure it is a twin operation but for my understanding station acts as a compound operation.

The debugger tells you what type "Station" is.