Model Information
Methods Introduced:
The method
pfcModel.Model.IsNativeModel returns
true, if the specified model is a native
Creo model. It returns
false, when the model is a non-native part or assembly created in other CAD applications.
The method
pfcModel.Model.GetFileName retrieves the model file name in the "name"."type" format.
The method
pfcModel.Model.GetCommonName retrieves the common name for the model. This name is displayed for the model in
Windchill PDMLink.
Use the method
pfcModel.Model.IsCommonNameModifiable to identify if the common name of the model can be modified. You can modify the name for models that are not yet owned by
Windchill PDMLink, or in certain situations if the configuration option
let_proe_rename_pdm_objects is set to
yes.
The method
pfcModel.Model.GetFullName retrieves the full name of the model in the instance <generic> format.
The method
pfcModel.Model.GetGenericName retrieves the name of the generic model. If the model is not an instance, this name must be
NULL or an empty string.
The method
pfcModel.Model.GetInstanceName retrieves the name of the model. If the model is an instance, this method retrieves the instance name.
The method
wfcModel.WModel.GetDefaultName gets the default name assigned to the model by
Creo application at the time of creation.
The method
pfcModel.Model.GetOrigin returns the complete path to the file from which the model was opened. This path can be a location on disk from a
Windchill workspace, or from a downloaded URL.
The method
pfcModel.Model.GetRelationId retrieves the relation identifier of the specified model. It can be
NULL.
The method
pfcModel.Model.GetDescr returns the descriptor for the specified model. Model descriptors can be used to represent models not currently in session.
|
|
From Pro/ENGINEER Wildfire 4.0 onwards, the methods pfcModel.Model.GetFullName, pfcModel.Model.GetGenericName, and pfcModel.Model.GetDescr throw an exception pfcExceptions.XtoolkitCantOpen if called on a model instance whose immediate generic is not in session. Handle this exception and typecast the model as pfcSolid.Solid, which in turn can be typecast as pfcFamily.FamilyMember, and use the method pfcFamily.FamilyMember.GetImmediateGenericInfo to get the model descriptor of the immediate generic model. The model descriptor can be used to derive the full name or generic name of the model. If you wish to switch off this behavior and continue to run legacy applications in the pre- Wildfire 4.0 mode, set the configuration option retrieve_instance_dependencies to instance_and_generic_deps.
|
The method
pfcModel.Model.GetType returns the type of model in the form of the
pfcModel.ModelType object. The types of models are as follows:
• MDL_ASSEMBLY—Specifies an assembly.
• MDL_PART—Specifies a part.
• MDL_DRAWING—Specifies a drawing.
• MDL_2D_SECTION—Specifies a 2D section.
• MDL_LAYOUT—Specifies a notebook.
• MDL_DWG_FORMAT—Specifies a drawing format.
• MDL_MFG—Specifies a manufacturing model.
• MDL_REPORT—Specifies a report.
• MDL_MARKUP—Specifies a drawing markup.
• MDL_DIAGRAM—Specifies a diagram
• MDL_CE_SOLID—Specifies a Layout model.
|
|
Creo Object TOOLKIT Java methods will only be able to read models of type Layout, but will not be able to pass Layout models as input to other methods. PTC recommends that you review all Creo Object TOOLKIT Java applications that use the enumerated type ModelType and modify the code as appropriate to ensure that the applications work correctly.
|
The method
pfcModel.Model.GetIsModified identifies whether the model has been modified since it was last saved.
The method
pfcModel.Model.GetVersion returns the version of the specified model from the PDM system. It can be
NULL, if not set.
The method
pfcModel.Model.GetRevision returns the revision number of the specified model from the PDM system. It can be
NULL, if not set.
The method
pfcModel.Model.GetBranch returns the branch of the specified model from the PDM system. It can be
NULL, if not set.
The method
pfcModel.Model.GetReleaseLevel returns the release level of the specified model from the PDM system. It can be
NULL, if not set.
The method
pfcModel.Model.GetVersionStamp returns the version stamp of the specified model. The version stamp is a
Creo specific identifier that changes with each change made to the model.
The method
pfcModel.Model.ListDependencies returns a list of the first-level dependencies for the specified model in the
Creo workspace in the form of the
pfcModel.Dependencies object.
The method
pfcModel.Model.ListDeclaredModels returns a list of all the first-level objects declared for the specified model.
Use the method
pfcModel.Model.CleanupDependencies to clean the dependencies for an object in the
Creo workspace.
|
|
Do not call the method pfcModel.Model.CleanupDependencies during operations that alter the dependencies, such as, restructuring components and creating or redefining features.
|
The method
pfcModel.Model.CheckIsModifiable identifies if a given model can be modified without checking for any subordinate models. This method takes a boolean argument
ShowUI that determines whether the
Creo conflict resolution dialog box should be displayed to resolve conflicts, if detected. If this argument is false, then the conflict resolution dialog box is not displayed, and the model can be modified only if there are no conflicts that cannot be overridden, or are resolved by default resolution actions. For a generic model, if
ShowUI is true, then all instances of the model are also checked.
The method
pfcModel.Model.CheckIsSaveAllowed identifies if a given model can be saved along with all of its subordinate models. The subordinate models can be saved based on their modification status and the value of the configuration option
save_objects. This method also checks the current user interface context to identify if it is currently safe to save the model. Thus, calling this method at different times might return different results. This method takes a boolean argument
ShowUI. Refer to the previous method for more information on this argument.
The method
wfcModel.WModel.GetSubType returns the subtype of the specified model using the enumerated object
wfcModel.ModelSubType. This is similar to selecting types and sub-types of models available in the
Creo user interface using the command > .