DELENT   

Equivalent PK functions: PK_ENTITY_delete

DELENT ( entity, ifail )
========================

  Delete entity

Receives:
  KI_tag_entity            *entity         --- entity to delete

Returns:
  KI_cod_error             *ifail          --- failure code

Specific errors:
  KI_still_referenced       argument is still referenced
  KI_wrong_entity           type of 'entity' is incorrect

Description:
  Deletes an entity, if possible. The following types of entity may be deleted:

      Assembly
      Instance
      Body
      Transformation
      Surface
      Curve
      Point
      List
      Attribute
      Feature

  Bodies and assemblies may not be deleted if they are still instanced: any
  instances must be deleted first.

  Attributes, features, instances, points and transformations can always be
  deleted.

  An orphan or construction curve or surface may not be deleted if it is a
  dependent in another geometric entity.

  A surface attached to a face or faces may be deleted if it is not a dependent
  in another geometric entity. Attempting to delete a surface which is attached
  to faces and is a dependent in another geometric entity does not delete the
  surface but severs the connection between the surface and its faces. Similar
  conditions apply to curves and edges.
  Note : deleting a surface of type TYSUOF (offset surface) also deletes the
  underlying surface.

  When a body is deleted all the topology, geometry and associated data in it
  are also deleted.

  When an assembly is deleted the construction geometry, instances and
  associated data in it are also deleted.