Skip to main content
5-Regular Member
Mar 8, 2022 6:54 AM UTC
Question

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

17-Peridot
Mar 10, 2022 5:44 AM UTC

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

Then use wfcWSelection::GetVisibleAppearance

Translate
5-Regular Member
Mar 15, 2022 11:30 AM UTC

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.

Translate
17-Peridot
Mar 16, 2022 11:47 AM UTC

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".

Translate