Deletes objects (entities) or restores previously deleted objects

(entdel  ename) 

The entity specified by ename is deleted if it is currently in the drawing. The entdel function restores the entity to the drawing if it has been deleted previously in this editing session. Deleted entities are purged from the drawing when the drawing is exited. The entdel function can delete both graphical and nongraphical entities.



Name of the entity to be deleted or restored.

Return Values

The entity name.

Usage Notes

The entdel function operates only on main entities. Attributes and polyline vertices cannot be deleted independently of their parent entities. You can use the command function to operate the ATTEDIT or PEDIT command in the Command Reference to modify subentities.

You cannot delete entities within a block definition. However, you can completely redefine a block definition, minus the entity you want deleted, with entmake.


Get the name of the first entity in the drawing and assign it to variable e1:

Command: (setq e1 (entnext))

<Entity name: 2c90520>

Delete the entity named by e1:

Command: (entdel e1)

<Entity name: 2c90520>

Restore the entity named by e1:

Command: (entdel e1)

<Entity name: 2c90520>

See Also