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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Getting all the features of an assembly model using toolkit

aniketpandit
5-Regular Member

Getting all the features of an assembly model using toolkit

Hello, I am new to using toolkit. I want to club all the cosmetic sketches from an assembly model into a new layer in its drawing. For that, I need to get all the features of the model. What is the API which enlists all the features of a model? Any help would be greatly appreciated. Thanks, Aniket

3 REPLIES 3

You can achieve it easily with Creo Toolkit API, but the hard part is you need to learn the basics first.

Creo toolkit reference and sample file available with Creo toolkit installation folder

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"
aniketpandit
5-Regular Member
(To:PARTHIBAN_K)

Hi PK, 

 

Thanks for your reply! I wanted to club all the cosmetic sketches in .asm file in a single layer. I am using the API ProSolidFeatVisit() to visit all the features and identify the cosmetic ones. However, the API only visits the features within that level. That is, if there are other .prt or .asm models within the parent model having the cosmetic features, they don't get identified. Is there a way we can visit all the features within all the levels?

 

Regards,

Aniket

You can play with while, if and for loops

Use for loop to collect all the sub asm and part models & use while until the last child is part model then collect all cosmetics with id for all the part models.

This is the concept, you've to work on this. Just try

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"
Announcements


Top Tags