Functions Introduced:
This section describes the utility functions that relate to simplified representations.
ProSolidSimprepVisit() is like the other visit functions, and visits all the simplified representations of a parent ProSolid. The function visits only user-defined representation.
As all other visit functions, it takes four arguments—a pointer to the parent ProSolid, a filter function, the visit function itself, and a ProAppData field.
The function ProSimprepInit() initializes a ProSimprep structure. The function takes the following arguments:
|
• |
ProNamerep_name— The name of the simplified representation in the solid. If you specify this argument, the function ignores the rep_id. |
|
• |
intrep_id—The identifier of the simplified representation, if you did not specify rep_name (you specified NULL). |
|
• |
ProSolidp_solid—The parent solid that contains the simplified representation. |
|
• |
ProSimprepp_simp_rep—The handle to the newly initialized simplified representation. |
The function ProSimprepSelect() creates a Creo Parametric menu to enable interactive selection. The function takes the parent solid as input, and outputs the handle to the selected
simplified representation. If you choose the Quit menu button, the function returns the value PRO_TK_USER_ABORT. If the user selects the master representation, the returned simplified representation structure has an identifier of –1.
ProSimprepActivate() enables you to set the currently active simplified representation. To set a simplified representation to be the currently
displayed model, you must also call ProSolidDisplay(). This function enables you to bring inactive submodels into memory, and use their handles without displaying them.
ProSimprepActivate() does not support activation of part simplified representations, because part simplified representation handles cannot be
passed to this function. You can display the simplified representation in a window using ProSolidDisplay().
ProSimprepActiveGet() enables you to find the currently active simplified representation. Given a model handle, ProSimprepActiveGet() returns the handle to the currently active simplified representation. If the current representation is the master representation,
the identifier of the handle is set to –1.
The function
ProSimprepTypeGet() returns the type of a specified simplified representation using the enumerated data type
ProSimprepType:
|
• |
PRO_SIMPREP_MASTER_REP—Specifies a fully detailed assembly. The model tree lists all its components and identifies them as included, excluded, or
substituted. |
|
• |
PRO_SIMPREP_USER_DEFINED—Specifies a representation from the selected component. |
|
• |
PRO_SIMPREP_GRAPH_REP—Specifies a representation that contains only information for display. You can quickly browse through a large assembly. Graphics
representations cannot be modified or referenced. |
|
• |
PRO_SIMPREP_GEOM_REP—Specifies a representations that contains complete component geometry information. As compared to graphics representations,
geometry representations take longer to retrieve and require more memory. |
|
• |
PRO_SIMPREP_SYMB_REP—Specifies a representation that allows you to represent components with a symbol. |
|
• |
PRO_SIMPREP_DEFENV_REP—Specifies a representation that allows you to represent assembly components with an default envelope. |
|
• |
PRO_SIMPREP_LIGHT_GRAPH_REP—Specifies a lightweight graphics representations of assemblies that contains assembly information and 3D thumbnail graphics
representations of assembly components. |
|
• |
PRO_SIMPREP_AUTO_REP—Specifies a representation for retrieving the minimum data that is required for presenting the assembly in the most accurate
way. You can perform actions such as measuring distances between points on a light surface without retrieving the part geometry. |
Note
When two standard representations of the same model are retrieved, for better memory usage, only one representation is used
in the memory. The lower detailed representation is integrated into higher detailed representation. This higher detailed representation
is used to retrieve both the representations.
If you retrieve a lower detailed representation when a higher detailed representation is already in the memory, this higher
detailed representation is used and actually no retrieval is done.
The hierarchy for the representations is as follows with Master Simplified Representation being the highest representation
level:
|
• |
Boundary Box Simplified Representation |
|
• |
Symbolic Simplified Representation |
|
• |
Graphic Simplified Representation |
|
• |
Geometry Simplified Representation |
|
• |
Master Simplified Representation |
Refer to the
Creo Parametric help for more information on Assembly Design.
The function ProSimprepIsDefault() determines if the specified simplified representation is the default representation for the owner model.