(entmod data)
The entmod function allows the modification of a basic entity or complex block definition in the current drawing database.
ata contains the defining data of the entity to be modified.
The entity to be modified must exist in the current drawing.
Before modifying the entity, entmod tests the validity of the arguments for Layer name, LineColor, LineStyle, and TextStyle.
The name of the entity (Ename) to be modified must be provided in the first element of the list (group = -1). Otherwise entmod cancels and returns nil.
The reference (handle) of the entity cannot be changed. The same is true for other internal fields like the entity name (group = -1).
Modifying a main (non-complex) entity causes automatically a redrawing of the changed entity on the screen.
If the modified entity is a sub-entity (for example, a vertex of a PolyLine or a BlockAttribute of an Insert entity), the display of the complex object needs to be refreshed (redrawn) on the screen with the entupd function.
If the function succeeds, it returns the entity information list; otherwise, the function nil.
Example
: (setq x (entget (car (entsel))))
: (setq x (subst (cons 62 1) (assoc 62 x) x))
: (entmod x)
Related Functions