User's Guide > The Basics of Web.Link > Model and File Management > File Management Operations
File Management Operations
 
Functions Introduced:
The function pfcScript.pwlMdlOpen() retrieves the specified model. The syntax is as follows:
pwlMdlOpen (
string MdlNameExt, // The full name of the
// model.
string Path, // The full directory
// path to the model.
boolean DisplayInWindow // If this is true, display
// the retrieved model in
// a Creo Parametric window.
);
Additional return field:
integer WindowID; // The identifier of the
// window in which the
// model is displayed.
The Path argument is the full directory path to the model. If the model is already in memory, the function ignores this argument. If you try to open a model that is already in memory and supply an invalid Path, pfcScript.pwlMdlOpen() successfully opens the model anyway.
If Path is an empty string, the function uses the default Creo Parametric search path.
You can use the function pfcScript.pwlMdlOpen() to open a family table instance by specifying the name of the generic instance as the MdlNameExt argument.
The function pfcScript.pwlMdlErase() saves the model in memory to disk, under a new name. The syntax is as follows:
pwlMdlSaveAs (
string OrigNameExt, // The original name of the
// model, including the
// extension
string NewPath, // The new path to the model
string NewNameExt // The new name of the model,
// including the extension
);
* 
Web.Link does not currently support the Creo Parametric methods of saving subcomponents under new names, so NewPath and NewNameExt are optional.
The function pfcScript.pwlMdlErase() removes the specified model from memory. The syntax is as follows:
pwlMdlErase (
string MdlNameExt // The full name of the model
// to erase from memory
);
To rename a model in memory and on disk, use the function pfcScript.pwlMdlRename(). Note that the model must be in the current directory for the model to be renamed on disk. The syntax is as follows:
pwlMdlRename (
string OrigNameExt, // The original name of the
// model, including the
// extension
string NewNameExt // The new name of the model,
// including the extension
);
Was this helpful?