sdaiDeleteModel
Deletes a model in the EDMdatabase. The actual model must be closed.
A dictionary model cannot be deleted as long as there exists data models in the EDMdatabase that have the EXPRESS schema defined by the actual dictionary model as the underlying schema. All such data models must be deleted before the actual dictionary model can be deleted.
A dictionary model cannot be deleted as long as there exists Express-X dictionary models in the EDMdatabase that uses the actual dictionary model as the source model or the target model. All such Express-X dictionary models must be deleted before the actual dictionary model can be deleted.
When the actual model to delete has a connected STEP Identifier model, this connected STEP Identifier model will be deleted as well by this operation.
Only the owner of a model can delete it.
Related functions: edmiDeleteModelBN, edmiDeleteOpenModel , sdaiCreateModel , sdaiCreateModelBN , edmiCreateModel , edmiCreateModelBN
Header:
#include "sdai.h"
Prototype:
void sdaiDeleteModel(SdaiModel model);
Arguments:
model |
A numeric modelID that uniquely identifies the model in the EDMdatabase to delete. |
Returns:
Void – use sdaiErrorQuery to check for error during operation.
Example:
SdaiRepository repository;
SdaiSchema schema;
SdaiModel modelId;
SdaiErrorCode errCode;
...
modelId = sdaiCreateModelBN (repository, "Building_AXD67H", "IFC151");
. . .
sdaiDeleteModel(modelId);
errCode = sdaiErrorQuery();
if (errCode) {
/* Error in operation */
printf("\nError: %s in sdaiDeleteModel \n",
edmiGetErrorText(errCode));
goto error;
}
. . .