Showing results for 
Search instead for 
Did you mean: 

Re: what is PlanningRepresentation and EngineeringRepresentation?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Remond,


To get all parts that are currently loaded in the scene, use that code:


private TxObjectList GetParts()
            //get all components (parts, resources, equipments)
            TxObjectList components = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(ITxComponent)));
            TxObjectList planningComponents = components.PlanningRepresentations;

            TxTypeFilter partsFilter = new TxTypeFilter(typeof(ITxPlanningPart));
            TxObjectList planningParts = partsFilter.Filter(planningComponents);
            TxObjectList engineeringParts = planningParts.EngineeringRepresentations;
return engineeringParts;

In the .NET API there is no special class for parts and resources, but we can filter them by the planning representation.



Best Regards,