Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Access feature ID


Access feature ID

Hey everybody,


is there a way to access the feature ID from a part or assembly programmatically? I know that it is possible to get the feature ID via the selection option but can I archive the same without user input? Is it possible to generate a list of all parts of an assembly which contain said ID?


Any help is greatly appreciated!!


Try it like this:


Session session = pfcSession.GetCurrentSession ();
Model model = session.GetCurrentModel ();
Solid solid = (Solid)model;
Features Feats = solid.ListFeaturesByType(Boolean.TRUE, FeatureType.FEATTYPE_COMPONENT);
Feats.get(component number in your part or assembly).GetId()



Many ways to get there - depends on the language you are using.


In CREOSON - you can simply request (from any programming/scripting language):


-->> bom : get_paths (paths = true)

This will return all the children of your assembly and will include:

  • file - name of model
  • seq_path - bom structure path
  • path [array of component ids]

from then it is just a matter of filtering the results for what you are looking for and what you want to do with the information.  (a simple filter function or for loop would do the trick)


Hope that helps/inspires.



Top Tags