Methods and Properties Introduced:
|
|
pfcModel.IsCommonNameModifiable() |
|
|
pfcModel.ListDependencies() |
|
|
pfcModel.CleanupDependencies() |
|
|
pfcModel.ListDeclaredModels() |
|
|
pfcModel.CheckIsModifiable() |
|
|
pfcModel.CheckIsSaveAllowed() |
The property pfcModel.FileName retrieves the model file name in the "name"."type" format.
The property pfcModel.CommonName retrieves the common name for the model. This name is displayed for the model in Windchill PDMLink.
Use the method pfcModel.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 property pfcModel.FullName retrieves the full name of the model in the instance <generic> format.
The property pfcModel.GenericName retrieves the name of the generic model. If the model is not an instance, this name must be NULL or an empty string.
The property pfcModel.InstanceName retrieves the name of the model. If the model is an instance, this method retrieves the instance name.
The property pfcModel.Origin 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 property pfcModel.RelationId retrieves the relation identifier of the specified model. It can be NULL.
The property pfcModel.Descr returns the descriptor for the specified model. Model descriptors can be used to represent models not currently in session.
Note
From Pro/ENGINEER Wildfire 4.0 onwards, the properties pfcModel.DescrpfcModel.Descr, pfcModel.Descr, and pfcModel.Descr throw an exception pfcXtoolkitCantOpen if called on a model instance whose immediate generic is not in session. Handle this exception and typecast the model as
pfcSolid, which in turn can be typecast as pfcFamilyMember, and use the method pfcFamilyMember.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 property pfcModel.Type returns the type of model in the form of the pfcModelType 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.
Note
Web.Link 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 Web.Link applications that use the object pfcModelType and modify the code as appropriate to ensure that the applications work correctly.
|
The property pfcModel.IsModified identifies whether the model has been modified since it was last saved.
The property pfcModel.Version returns the version of the specified model from the PDM system. It can be NULL, if not set.
The property pfcModel.Revision returns the revision number of the specified model from the PDM system. It can be NULL, if not set.
The property pfcModel.Branch returns the branch of the specified model from the PDM system. It can be NULL, if not set.
The property pfcModel.ReleaseLevel returns the release level of the specified model from the PDM system. It can be NULL, if not set.
The property pfcModel.VersionStamp returns the version stamp of the specified model. The version stamp is a Creo Parametric specific identifier that changes with each change made to the model.
The method pfcModel.ListDependencies() returns a list of the first-level dependencies for the specified model in the Creo Parametric workspace in the form of the pfcDependencies object.
Use the method
pfcModel.CleanupDependencies() to clean the dependencies for an object in the
Creo Parametric workspace.
Note
Do not call the method pfcModel.CleanupDependencies() during operations that alter the dependencies, such as, restructuring components and creating or redefining features.
The method pfcModel.ListDeclaredModels() returns a list of all the first-level objects declared for the specified model.
The method pfcModel.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 Parametric 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.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.