Skip to main content
5-Regular Member
March 8, 2022
Question

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

  • March 8, 2022
  • 1 reply
  • 1897 views

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

1 reply

17-Peridot
March 10, 2022

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

Then use wfcWSelection::GetVisibleAppearance

5-Regular Member
March 15, 2022

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.

17-Peridot
March 16, 2022

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