File Management Operations
Functions Introduced:
These functions perform the same actions as the corresponding file management commands, with the following exceptions:
• ProMdlnameRetrieve() retrieves the model into memory, but does not display it or make it the current model.
• ProMdlMultipleRetrieve() retrieves multiple models into memory. Use the
ui_flag parameter to set model display to on or off.
• ProSolidRetrievalErrorsGet() returns the data structure containing errors that occur during model retrieval. While retrieving a complex assembly, sometimes encounters errors in retrieving particular components and assembling them appropriately in the assembly. In the user interface, you are informed of errors as they occur, through a dialog box. In , the retrieval functions automatically suppress or freeze problem components and return
PRO_TK_NO_ERROR. To know whether errors have occurred during retrieval, use the function
ProSolidRetrievalErrorsGet(). The errors are returned as the elements of the
ProSolidretrievalerrs array. The retrieval error information must be obtained immediately after a call to the
ProMdlnameRetrieve() or equivalent retrieval function.
• ProMdlSave() saves the specified model to disk. For drawings, sketches and other 2D model types, to save the graphics data, you must display it. Call the function
ProMdlDisplay() before
ProMdlSave(), so that the graphics data is saved along with the geometry for the model.
• ProMdlEraseAll() erases a model and all the models that it uses, except those that have cyclic dependencies (that is, models used by other models in the session). For example,
ProMdlEraseAll() recursively erases all subassemblies of an assembly and all solids referenced from a drawing. This function also works in cases where some models to be erased have mutual dependencies, but only if the erased models are not used by other models.
However, while erasing an active model,
ProMdlErase() and
ProMdlEraseAll() only clear the graphic display immediately, they do not clear the data in the memory until the control returns to from the application. Therefore, after calling them the control must be returned to before calling any other function, otherwise the behavior of may be unpredictable.
The function
ProMdlLocationIsStandard() 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 function returns:
• PRO_B_TRUE when the file is loaded from a standard file location.
• PRO_B_FALSE when the file is loaded from a nonstandard file location, such as, http, ftp, Design Exploration mode, and so on.
Parent topic