You can use extended data (xdata) to store any type of information you want on an entity.
The xdata attached to an entity might be a record in an external database, a date and time stamp when an entity was added or modified, or contain information that represents an item in the real-world such as a telephone or workstation. Since xdata is hidden from the user, it makes it harder to modify without using a custom application.
; Gets the association list of definition data ; for the last entity. (setq lastent (entget (entlast))) ; Registers the application name. (regapp "NEWDATA") (setq exdata ; Sets the variable '((-3 ("NEWDATA" ; exdata equal to the (1000 . "This is a new thing!") ; new extended data— ))) ; in this case, a text ) ; string. ; Appends new data list to entity's list. (setq newent (append lastent exdata)) ; Modifies the entity with the new definition data. (entmod newent)
(entget (car (entsel)) '("NEWDATA"))