06-02-2015 06:26 AM
Hello,
I want to be able to load multiple Guns into the Graphic Viewer from the ResourceLibrary on selection. Basically I cannot find a link between the planning data (TxPlanningObject) and loading this data into the graphic viewer i.e TxGun. Idealy I would like to do this without worrying about a study but if this is not possible that is also ok.
So far I have the following code:
Dim resLibPlanObj As TxPlanningObject = TxApplication.ActiveSelection.GetPlanningItems.Item(0) If resLibPlanObj.PlanningType.Equals("PmResourceLibrary") = True Then For Each item As TxPlanningObject In TxEmsTraversalManager.GetAllDescendants(resLibPlanObj) If item.PlanningType = "Gun" Then 'At this point I would like to load each gun into the Graphic Viewer End If Next Else End If
Thanks in adavance.
Kind regards
Solved! Go to Solution.
06-08-2015 07:51 AM
Hi!
Look into ITxComponentCreation -> InsertComponent Method, It derives from ITxObject. For the implementation of the InsertComponent method look at TxInsertComponentCreationData, this class has a link with your TxPlanningObject (propertie).
Best Regards,
Pim
06-08-2015 09:28 AM
Hi Pim
Thank you so much! That works perfectly. I really appreciate it!
Kindest regards,
RobSimCoder
Watch Replays of Previous Topics