Models in Session
Functions Introduced:
The function
ProSessionMdlList() provides an array of
ProMdl handles to models of a specified type currently in memory.
The function
ProMdlCurrentGet() provides the
ProMdl handle to the model currently being edited by the user.
The function
ProMdlDependenciesDataList() provides an array of
ProMdl handles to the models in memory upon which a specified model depends. One model depends on another if its contents reference that model in some way. For example, an assembly depends on the models that form its components, and a drawing model depends on the solid models contained in it. Sometimes, two models can be mutually dependent, such as when a model feature references a geometry item in a parent assembly. Clean the dependencies in the database using the function
ProMdlDependenciesCleanup() to get an accurate list of dependencies for an object in the
Creo+ workspace.
Use the function
ProMdlDependenciesCleanup() to clean the dependencies for an object in the
Creo+ workspace.
|
Note:
|
Do not call the function ProMdlDependenciesCleanup() during operations that alter the dependencies, such as, restructuring components and creating or redefining features.
|
The function
ProMdlDeclaredDataList() provides an array of
ProMdl handles to first-level notebook models that have been declared to a specified solid model.
The function
ProMdlModificationVerify() tells you whether a specified model in memory has been modified since it was last saved or retrieved. See the section
Version Stamps for a more flexible way of keeping track of changes to a model.
The function
ProMdlVisibleModificationVerify() checks if the visible model of the specified model has been modified since the last save. The input argument
handle is used to verify the
ProMdl object.
The output argument p_modified returns PRO_B_TRUE if the model was modified and returns PRO_B_FALSE if the model was not modified.
The function
ProMdlIsModifiable() checks if the specified model is modifiable. The input arguments are as follows:
• pp_models—ProArray of models to check.
• show_ui—Pass a Proboolean value PRO_B_TRUE, if you want the Conflicts dialog box to be displayed to resolve detected conflicts. If you pass PRO_B_FALSE, the dialog box is not displayed.
The function
ProMdlHasNoConflict() checks if the specified model does not have a storage conflict at the time of saving the modifications. The input arguments are as follows:
• model to check—The model to be checked.
• resolve—Pass a Proboolean with the value PRO_B_TRUE, to apply the default resolutions to the detected conflicts. The default conflict resolution in Windchill workspace for checked-in objects is controlled by the configuration option dm_checkout_on_the_fly. The valid values are:
◦ Checkout
◦ Continue
The function
ProMdlsAreModifiable() checks if the specified models are modifiable. The input arguments are as follows:
• pp_models—ProArray of models to check.
• show_ui—Pass a Proboolean value PRO_B_TRUE, if you want the Conflicts dialog box to be displayed to resolve detected conflicts.
The function
ProMdlsHaveNoConflict() checks if the specified models do not have a storage conflict at the time of saving the modifications. The input arguments are as follows:
• pp_models—ProArray of models to check.
• resolve—Pass a Proboolean value PRO_B_TRUE, to apply the default resolutions to the detected conflicts.
The output argument no_conflict is a boolean PRO_B_TRUE which indicates that no conflict are found
The function
ProMdlIsEmbeddedName() checks if the specified model name or full path that includes the model name is an embedded model name. The output argument
is_embedded_name returns
PRO_B_TRUE if the model name is an embedded name,
PRO_B_FALSE if not.
In intersected embedded components, the name of the embedded model cannot be used for file operations. If you are using the embedded name while creating a new application, the file operation might fail. In such case, you must use the generic or visible model name.
The function
ProMdlVisibleGet() returns the handle to the generic or visible model for the specified model. The function returns an error
PRO_TK_E_NOT_FOUND, when the generic or visible model does not exist or is not found in the
Creo+ session.
When an embedded component is extracted, a copy of the embedded solid is created and the embedded component model is replaced by the new non-embedded copy. In this extract operation, the original embedded model is erased and the name of the model is changed.
For embed operations, if a model has embedded components, a copy of the existing embedded models is created under the currently embedded model.