PK_ENTITY_delete   

PK_ERROR_code_t    PK_ENTITY_delete
(
--- received arguments ---
int                n_entities,      --- number of entities to be deleted
const PK_ENTITY_t *entities         --- entities to be deleted
)


This function deletes the given entities.


Specific Errors:
    PK_ERROR_wrong_entity           (MILD) some entity is of a class for which
                                    deletion is not allowed
    PK_ERROR_still_referenced       (SERIOUS) some entity cannot be deleted
                                    since it is still referenced by an entity
                                    not in the given array


The classes of entities for which deletion is allowed are:

    PK_CLASS_assembly
    PK_CLASS_attrib
    PK_CLASS_body
    PK_CLASS_curve
    PK_CLASS_group
    PK_CLASS_instance
    PK_CLASS_ki_list
    PK_CLASS_lattice
    PK_CLASS_point
    PK_CLASS_surf
    PK_CLASS_transf

Deleting a group does not delete the entities it contains.

If a body or assembly is instanced it can not be deleted unless that instance
is included in the array.

Deleting a compound body deletes all its children.

If a geometric entity is used in the definition of another geometric
entity (e.g. base surface of an offset), then it may not be deleted unless that
other entity is included in the array.

Geometric entities attached to faces, edges or vertices will be detached before
deletion. When deleting geometric entities, their geometric dependents will
also be deleted if they no longer have any geometric or topological owners.

The error PK_ERROR_still_referenced is raised with severity PK_ERROR_mild if
no entities have been deleted, but with a severity of PK_ERROR_serious if
some entities have been deleted.