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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to get the appearance of a part and surface in an assembly using Creo object toolkit C++

MK_10060470
5-Regular Member

How to get the appearance of a part and surface in an assembly using Creo object toolkit C++

I need to obtain the appearance data of the parts and surfaces present in an assembly without the user interaction i.e., without interactively selecting the parts and surfaces by the user. 

I am using Creo parametric version 8.0.2.0

4 REPLIES 4

Use the method pfcCreateModelSelection to create a pfcSelection object, based on a pfcModel object.

Then use wfcWSelection::GetVisibleAppearance

MK_10060470
5-Regular Member
(To:YaroslavSin)

What about getting the appearance by surfaces in an assembly. I tried using pfcCreateModelItemSelection without providing the optional pfcComponentPath argument. 

Upon checking, found that we have to set the pfcComponentPath argument. Please help me how to set the pfcComponentPath in order to obtain the appearance data by surface in an assembly.

ComponentPath is a just array of IDs. From main assy to target component.

Take a look at the documentation "Structure of Assemblies and Assembly Objects".

MK_10060470
5-Regular Member
(To:YaroslavSin)

In some models upon selecting a surface in Assembly by setting proper pfcComponentPath for pfcCreateModelItemSelection results in pfcXInvalidSelection exception. I have cross-checked the pfcComponentPath and the component using the creo application.

 

Is there any other case I have to consider when selecting the surfaces?

Top Tags