Function Entry: ENTGET

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

Function Entry: ENTGET

Name

entget

Class

Host Function

Syntax

(entget ename [applist])

Arguments and Values

  • ename: entity name
  • applist: optional list of registered application names

Description

Returns the definition data of an entity as an association list of dotted pairs.

Return Values

Association list representing the entity definition.

If applist is supplied, Autodesk documents that entget also retrieves extended data for the specified registered applications.

Side Effects

None.

Affected By

  • validity of the entity name
  • the optional application filter list

Exceptional Situations

Erroneous if the entity name is invalid or unacceptable to the host.

Examples

  • (entget ename) => ((-1 . <ename>) (0 . "LINE") …)

Compatibility

This is one of the central functions of the AutoLISP host database model.

Notes

entget strongly reinforces the importance of alists and dotted pairs in the language specification.

Autodesk explicitly notes that AutoLISP DXF group codes differ slightly from those in DXF files.

clautolisp

The returned list begins with the (-1 . <ename>) pair and carries the (5 . "<handle>") pair, then the entity's group codes. Without the applist argument, extended data (xdata) is suppressed; supply a list of registered application names — or the wildcard "*" — to append the matching applications' xdata as a trailing (-3 …) group, per the vendor contract. clautolisp stamps the well-known (100 . "AcDb…") subclass markers and a (8 . "0") layer default at entmake~/~entmakex time, so an entget right after a create surfaces more group codes than were supplied; the exact default-code set and marker ordering are being verified against AutoCAD/BricsCAD through the portable entity probes and are not normative.

XData round-trips losslessly through entget~/~entmod. The full group-code set is preserved verbatim — 1000 string, 1001 appname, 1002 control string {~/}~ (nested), 1003 layer, 1004 binary, 1005 handle, 1010/1011/1012/1013 points, 1040 real, 1041/1042 dist/scale, 1070 int16, 1071 int32 — with order and multiplicity within each application preserved (the host never normalizes xdata). entmod edits xdata per application: an application present in the supplied (-3 …) cell replaces that application's group; an application with an empty group is removed; applications absent from the cell are left untouched.

clautolisp implementation deviation — not part of the normative specification above. Under the cador host (since clautolisp 2.3.7) the DXF pointer group codes 330-369, 390-399 and 480-481 are returned as entity names, as the vendors do (measured 2026-10-08 on AutoCAD 2022 and BricsCAD V25 / V26); 5, 105 and the xdata 1005 stay handle strings; 320-329 and the null owner of the named-object dictionary follow the dialect's product (AutoCAD: strings, <Entity name: 0>; BricsCAD: entity names, pair omitted); a pointer to an erased object is still the same entity name, whose entget is nil. A handle string in a pointer code is an error under the vendor dialects, as on both vendors; under --dialect clautolisp and strict it is stored with an [entmake-pointer-value] warning, under lax silently – that acceptance is the deviation. Where cador also deviates: an entity it created in model or paper space carries no (330 . <block record>) owner, and the header groups come in the order -1 5 0 rather than the vendors' -1 0 5 … 330 100 (issues/open/cador-entget-owner-and-header-layout.issue). The corner cases are measured by probes/sources/probe-entget-pointers.lsp.

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.