Is there a way to get the locations that are in an operation given that I have a link to the path?
I see this to get all of the locations at the opertation root:
TxObjectList locList = TxApplication.ActiveDocument.OperationRoot.GetAllDescendants(new TxTypeFilter(typeof(ITxLocationOperation)));
Then I could probably use the Collection property to drill up and get the opertaion, but I would have to do that for every location and workout duplicate operations. That does not seem very efficent given I already have the collection of operations. Anyway to drill down from the operation and get the locations (children)?
Solved! Go to Solution.
Here an quick example how to get all location under a weld operation.
TxObjectList selection = TxApplication.ActiveDocument.Selection.GetAllItems(); TxWeldOperation weldOp = selection as TxWeldOperation; TxObjectList locatons = weldOp.GetAllDescendants(new TxNoTypeFilter());