Creates a new entity in the drawing
(entmake [elist])
entmake function can define both graphical and nongraphical entities.
TheArguments
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 theCIRCLE 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,Return Values
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 (Examples
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 withA 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 theentmake ignores DXF group code 100 data for the following entity types:
For legacy reasons,entdel, entget, entmod, and handent functions. In the AutoLISP Developer's Guide, refer to Entity Data Functions for additional information on creating entities in a drawing, Adding an Entity to a Drawing for specifics on using entmake, and Creating Complex Entities for information on creating complex entities.
The