magic_halli
New member
Hi,
i read out the components (there feature regeneration number) of an assembly.
But how can i:
1. get the ID of these components, instead of the feature regeneration number???
2. open a found component in new window???
(3. get the name of each component???)
It would be nice, if question 1 or 2 could be answered at least.
Thanks a lot...
i read out the components (there feature regeneration number) of an assembly.
Code:
Session curSession = pfcGlobal.GetProESession();
Model model = curSession.GetCurrentModel();
Assembly asm = (Assembly)model;
ComponentFeat component;
Features m_items = asm.ListFeaturesByType(Boolean.FALSE, FeatureType.FEATTYPE_COMPONENT);
for (int i = 0; i < m_items.getarraysize(); i++){
component = (ComponentFeat)m_items.get(i);
String num = component.GetNumber().toString();
stringseq seq = stringseq.create();
seq.append(num);
curSession.UIDisplayMessage("message.txt", "Info: %0s", seq);
}
But how can i:
1. get the ID of these components, instead of the feature regeneration number???
2. open a found component in new window???
(3. get the name of each component???)
It would be nice, if question 1 or 2 could be answered at least.
Thanks a lot...