Appearance States
This section describes the Creo TOOLKIT functions that deal with appearance states.
About Appearance States
An appearance state captures appearances defined in the top-level model. It contains the appearances defined and applied to the models in the top-level model.
There are 2 predefined appearances:
•  Master—No appearances are defined in the top-level model. This state cannot be changed. When you make changes to component appearances, you have to save the changes under a new Appearance State.
•  Default—The is the active Appearance State when the model is retrieved. You can define and change this state.
Functions Introduced:
The function ProApprnstateNameGet() gets the name of an appearance state. The input argument to this function is apprn, which is a handle to the appearance state, and it is defined using the ProApprnstate object. The output argument r_name returns a pointer to a wchar string with the name of the appearance state, and the caller must release the string using ProWstringFree().
The function ProSolidApprnstateVisit() visits all the appearance states in the specified solid. The input arguments are:
•  p_solid—Specify the solid handle, which is defined using the ProSolid object.
•  visit_action—The visiting function is defined using the ProModelitemVisitAction object. If it returns any other value than PRO_TK_NO_ERROR, visiting stops.
•  filter_action—The filter function is defined using the ProModelitemFilterAction object. If NULL, all items are visited using the action function.
•  app_data—Specify the application data that pass to the filter and visit functions using the object ProAppData.
The function ProApprnstateIsActive() determines if the given appearance state is active. The input argument to this function is apprn, which is a handle to the appearance state, and it is defined using the ProApprnstate object. The output of the function r_is_active is PRO_B_TRUE if the appearance state is active and PRO_B_FALSE if it is not.