Category Creo Parametric fundamentals, Object ProMdl

Function ProMdlEraseAll


Description
Erases a model and all the models that it uses, except those also used by other models in session. For example, it erases recursively all subassemblies of an assembly, and all solids referenced from a drawing. It also works in cases where some of the models to be erased have mutual dependencies. When erasing the active model, graphic display is cleared immediately, but data is not cleared until the next command gets processed.

NOTE:

The erasing action caused by this function will be finished only after the execution control is returned to Creo Parametric. Therefore, calling other functions after this function without returning the control may lead to an unpredicted behavior.

Replacement in Object TOOLKIT: pfcModel::EraseWithDependencies
Synopsis
#include <ProMdl.h>
ProErrorProMdlEraseAll(
ProMdl model
/* (In)
The model to be erased
*/
)
Returns
PRO_TK_NO_ERROR PRO_TK_BAD_INPUTS
PRO_TK_BAD_CONTEXTCurrent User Interface context does not allow erasure of models (for example, when the Erase button is grayed out).
PRO_TK_E_IN_USEThe model could not be erased because it is in use, for example by another model in the session.

Manual References:

  1. Core: Models and Model Items: File Management Operations
  2. Core: Models and Model Items: File Management Operations
  3. Interface: Importing Features

Sample Code References:

  1. pt_examples ( TestDbms.c )