Cancel
Showing results for 
Search instead for 
Did you mean: 

LineSimulationMode Difficulties

Valued Contributor
Valued Contributor

Hello All,

 

I got all the list of Parts (Txcomponent) through this below given code in standard mode. and then i made dropdowlist for Parts. I want to get that list also in Line Simulation Mode. But as TxComponent is changed to TxPartAppearance , i can not get list of partappearance in dropdownmenu. Is there any method available through which i can get dropdownlist?

public TxObjectList GetListOfParts()
        {
            TxObjectList components = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(TxComponent)));
            TxObjectList planningComponents = components.PlanningRepresentations;
            TxTypeFilter partsFilter = new TxTypeFilter(typeof(TxPlanningPart));
            TxObjectList planningParts = partsFilter.Filter(planningComponents);
            TxObjectList engineeringParts = planningParts.EngineeringRepresentations;
            return engineeringParts;
        }
2 REPLIES

Re: LineSimulationMode Difficulties

Siemens Genius Siemens Genius
Siemens Genius

Hi,

 

once there are appearances, you ca nuse this one:

(VB example)

m_AppFilter As New TxTypeFilter(GetType(ITxPartAppearance))

TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(m_AppFilter)

 

Regards,

Moshe

Re: LineSimulationMode Difficulties

Valued Contributor
Valued Contributor

HI @Hazan,

Thanx,

But i need to get list without generating appearance from operatons. Do u have any idea?