Creates a new entity in the drawing
entmake function can define both graphical and nongraphical entities.The
entget function. The elist argument must contain all of the information necessary to define the entity. If any required definition data is omitted, entmake returns nil and the entity is rejected. If you omit optional definition data (such as the layer), entmake uses the default value.A list of entity definition data in a format similar to that returned by the
CIRCLE or LINE) must be the first or second field of the elist. If entity type is the second field, it can be preceded only by the entity name. The entmake function ignores the entity name when creating the new entity. If the elist contains an entity handle, entmake ignores that too.The entity type (for example,
entmake returns the entity's list of definition data. If entmake is unable to create the entity, it returns nil.If successful,
entmake of an endblk) returns the block's name rather than the entity data list normally returned.Completion of a block definition (
The following code creates a red circle (color 62), centered at (4,4) with a radius of 1. The optional layer and linetype fields have been omitted and therefore assume default values.
Command: (entmake '((0 . "CIRCLE") (62 . 1) (10 4.0 4.0 0.0) (40 . 1.0)))
((0 . "CIRCLE") (62 . 1) (10 4.0 4.0 0.0) (40 . 1.0))
Notes on Using entmake
entmake.You cannot create viewport objects with
A group 66 code is honored only for insert objects (meaning attributes follow). For polyline entities, the group 66 code is forced to a value of 1 (meaning vertices follow), and for all other entities it takes a default of 0. The only entity that can follow a polyline entity is a vertex entity.
entmake function. If the block name is omitted from the entity definition list, AutoCAD creates a new one. Otherwise, AutoCAD creates the dimension using the name provided.The group code 2 (block name) of a dimension entity is optional for the
entmake ignores DXF group code 100 data for the following entity types:For legacy reasons,
, , , and functions. In the AutoLISP Developer's Guide, refer to for additional information on creating entities in a drawing, for specifics on using entmake, and for information on creating complex entities.The