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

Get a pointer of the assembly coordinate system?

Highlighted
Newbie

Get a pointer of the assembly coordinate system?

Fellow Toolkiter's

How do extract a pointer of the coordinate system in an assembly? I
have the handle of the assembly (ProMdl assem). What's next?

My main goal is to add additional coordinate systems to an assembly
based on the original coordinate system.

--
Thanks,
Jason Benoit
2 REPLIES 2

re: Get a pointer of the assembly coordinate system?

Eugene,

You have to traverse the features of the assembly using ProSolidFeatVisit(). You have to implement feature visit/filter functions (passed as function pointers to ProSolidFeatVisit) for each feature that is visited. Maybe you're looking for a coordinate system of a specific name. For that example, inside of your filter function you may get the feature type using ProFeatureTypeGet() and looking for features of type PRO_FEAT_CSYS (see ProFeatType.h). If the feature isn't a coordinate system, you'd pass PRO_TK_CONTINUE to not pass it to the visit function. After you'd established that the feature was a coordinate system, you'd get its name using ProModelitemNameGet() and compare the name to what you're looking for. Again, you'd return PRO_TK_CONTINUE if it didn't match and PRO_TK_NO_ERROR if it did. In the visit function, you'd add the feature to some type of "container" or directly to a ProFeature* handle that you pass to the visit funtion via the ProAppData argument.

This visit/filter type of functionality is common across many areas of Pro/Toolkit and one that you must be familiar with. Take a look at the "Pro/Toolkit User's Guide > Fundamentals > Pro/Toolkit Techniques > Visit Functions" for a better description of how this is done.

Good Luck,

Michael Fussy

re: Get a pointer of the assembly coordinate system?

Sorry.... Jason, not Eugene.