Function Entry: ENTMAKE

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: ENTMAKE

Name

entmake

Class

Host Function

Syntax

(entmake elist)

Arguments and Values

  • elist: entity definition association list

Description

Creates a new entity from a list of dotted pairs.

Return Values

Entity definition list for the new entity, or nil on failure according to Autodesk documentation.

Side Effects

Creates an entity in the drawing database.

Affected By

  • validity of entity type and group codes
  • current database context

Exceptional Situations

Invalid definitions may fail or be erroneous depending on host behavior.

Compatibility

One of the most characteristic AutoLISP functions because it exposes CAD entities through list structure.

clautolisp

On success entmake returns the supplied definition list verbatim — it does not inject the (-1 . <ename>) / (5 . "<handle>") pairs the database stores (obtain the resolved entity with (entget (entlast)), or create with entmakex to get the ename directly). A group-code list that does not describe a creatable entity — a missing/non-string (0 . "TYPE") marker, or a registered family missing a required group code — returns nil and sets ERRNO to 36; no Common-Lisp condition is raised. clautolisp validates the required codes of the modelled entity families (LINE, POINT, CIRCLE, ARC, ELLIPSE, LWPOLYLINE, POLYLINE + VERTEX/SEQEND, SPLINE, TEXT, MTEXT, ATTDEF, ATTRIB, INSERT, 3DFACE, SOLID, TRACE, RAY, XLINE, XRECORD) and accepts any other type permissively (pass-through). A POLYLINE/INSERT opens a subentity run whose VERTEX/ATTRIB/SEQEND pieces receive their (330 . <owner>) from the header unless one is supplied; the SEQEND closes the run.

R13+ subclass markers (resolved divergence — chapter 25 case 2)

For the entities AutoCAD introduced at R13 or later — ELLIPSE, LWPOLYLINE, RAY, XLINE, MTEXT, SPLINE (and their kin) — the AutoCAD AutoLISP reference explicitly requires the DXF subclass markers (100 . "AcDbEntity") and (100 . "AcDb<Type>") (e.g. (100 . "AcDbEllipse")) in the entmake data ("For entity types introduced in AutoCAD Release 13 and later releases, you must also specify subclass markers"), and AutoCAD returns nil (sets ERRNO) when they are absent. BricsCAD's reference is silent on the requirement and its product accepts marker-less data (synthesising the markers) — an undocumented leniency. The autolisp-spec adopts AutoCAD's documented requirement as normative (chapter 25, resolved divergence); BricsCAD's marker-less acceptance is a recognised but not condoned divergence. Pre-R13 entities (LINE, POINT, CIRCLE, ARC, TEXT, SOLID, 3DFACE, …) accept data without the markers on both vendors and are unaffected.

Per dialect (chapter 25):

  • --dialect autocad-2026, --dialect clautolisp, and --dialect strict — the normative behaviour: marker-less R13+ data returns nil (ERRNO 36). strict additionally emits the [entmake-subclass-marker] warning (any divergence is unsafe to rely on); autocad and clautolisp are silent.
  • --dialect bricscad-v26 — reproduces BricsCAD's leniency (accept + synthesise) and emits the [entmake-subclass-marker] warning (the non-condoned deviant dialect).
  • --lax — accept + synthesise, silently.

Supplying the markers explicitly is portable across all dialects and both vendors, and never warns.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • BricsCAD V26: presumed compatible (no contradicting page found).
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.