Model Operations
Methods Introduced:
These model operations duplicate most of the commands available in the Creo File menu.
The method
pfcModel.Model.Backup makes a backup of an object in memory to a disk in a specified directory.
The method
pfcModel.Model.Copy copies the specified model to another file.
The method
pfcModel.Model.CopyAndRetrieve copies the model to another name, and retrieves that new model into session.
The method
pfcModel.Model.Rename renames a specified model.
The method
pfcModel.Model.Save stores the specified model to a disk.
The method
pfcModel.Model.Erase erases the specified model from the session. Models used by other models cannot be erased until the models dependent upon them are erased.
The method
pfcModel.Model.EraseWithDependencies erases the specified model from the session and all the models on which the specified model depends from disk, if the dependencies are not needed by other items in session.
|
|
However, while erasing an active model, pfcModel.Model.Erase and pfcModel.Model.EraseWithDependencies only clear the graphic display immediately, they do not clear the data in the memory until the control returns to Creo application from the Creo Object TOOLKIT Java application. Therefore, after calling them the control must be returned to Creo before calling any other function, otherwise the behavior of Creo may be unpredictable.
|
The method
pfcModel.Model.Delete removes the specified model from memory and disk.
The method
pfcModel.Model.Display displays the specified model. You must call this method if you create a new window for a model because the model will not be displayed in the window until you call
pfcModel.Display.
The method
pfcModel.Model.SetCommonName modifies the common name of the specified model. You can modify this 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
wfcModel.WModel.IsStandardLocation checks if the specified model was opened from a standard location. A standard file location can be the local disk or a mapped drive on a remote computer. The Universal Naming Convention (UNC) path for network drives is also considered as a standard path if the value for
DisableUNCCheck is set to True for the key
HKEY_CURRENT_USER\Software\Microsoft\Command Processor, in the registry file. The method returns:
• True when the file is loaded from a standard file location.
• False when the file is loaded from a nonstandard file location, such as, http, ftp, Design Exploration mode, and so on.