Creates a new AcDbObject instance.
Optionalattrs: Partial<AcDbObjectAttrs>Input attribute values for this object
OptionaldefaultAttrs: Partial<AcDbObjectAttrs>Default values for attributes of this object
StatictypeThe runtime entity type name used by AcDbEntity.type.
Always 'ProxyEntity'.
Gets the registered application name that created the proxied object.
Corresponds to DXF extended-data group code 1001 when exported.
The creating application name, or an empty string when unset.
Sets the registered application name that created the proxied object.
Application name (DXF group code 1001).
Gets the attributes object for this AcDbObject.
The AcCmObject instance containing all attributes
Gets the database in which this object is resident.
When an object isn't added to a database, this property returns the current working database. After it is added to a database, it will be set automatically. You should never set this value manually.
The database this object belongs to
Sets the database for this object.
This is typically set automatically when the object is added to a database. Manual setting should be avoided unless you know what you're doing.
The database to associate with this object
Gets the DXF entity type name written to and read from drawing files.
The literal 'ACAD_PROXY_ENTITY'.
Gets the entity-origin anchor points stored on this proxy entity.
A read-only view of the origin points. Mutate through setEntityOrigins.
Gets the objectId of the extension dictionary owned by this object.
If the object does not have an extension dictionary, this returns undefined.
In ObjectARX terms, this is equivalent to AcDbObject::extensionDictionary().
The extension dictionary objectId, or undefined
Sets the objectId of the extension dictionary owned by this object.
This does not create or delete the dictionary object itself — it only establishes or clears the ownership relationship.
Passing undefined removes the association.
The extension dictionary objectId, or undefined
Gets the geometric extents of this proxy entity.
When the proxy-graphic stream contains an AcDbProxyGraphicType.Extents chunk, the returned box is built from its minimum and maximum corners. Otherwise an empty AcGeBox3d is returned.
The axis-aligned bounding box derived from proxy graphics.
Gets the graphics metafile type flag.
Corresponds to DXF group code 91.
The metafile / object-drawing-format flag.
Sets the graphics metafile type flag.
Metafile type (DXF group code 91).
Returns true if this object is temporary and not yet committed to the database.
A temporary object is identified by its objectId starting with the TEMP prefix.
Gets the name of the layer referenced by this entity.
The layer name
Sets the name of the layer for this entity.
The new layer name
Gets the line style for this entity.
This method returns the line style based on the entity's linetype and other properties.
The line style object
Gets the name of the line type referenced by this entity.
The linetype name
Sets the name of the line type for this entity.
The new linetype name
Gets the line type scale factor of this entity.
When an entity is first instantiated, its line type scale is initialized to an invalid value. When the entity is added to the database, if a linetype scale has not been specified for the entity, it is set to the database's current line type scale value.
The linetype scale factor
Sets the line type scale factor for this entity.
The new linetype scale factor
Gets the line weight used by this entity.
The line weight value
Sets the line weight for this entity.
The new line weight value
Gets the object ID.
AutoCAD uses 64-bit integers to represent handles, which exceed the maximum integer value of JavaScript. Therefore, strings are used to represent object handles.
The object ID as a string
Sets the object ID.
The new object ID
Gets the original ObjectARX class name of the proxied object.
Corresponds to DXF group code 3 when exported.
The ObjectARX class name, or an empty string when unset.
Sets the original ObjectARX class name of the proxied object.
ObjectARX class name (DXF group code 3).
Gets the original DXF name of the proxied entity class.
Mirrors the ObjectARX original-class DXF name and corresponds to DXF group code 1.
The proxied class DXF name, or an empty string when unset.
Sets the original DXF name of the proxied entity class.
Proxied class DXF name (DXF group code 1).
Gets the object ID of the owner of this object.
The owner object ID
Sets the object ID of the owner of this object.
The new owner object ID
Returns the full property definition for this entity, including all property groups and runtime accessors.
This getter is used by the property inspector UI to:
The returned structure contains:
Note: The groups array contains AcDbEntityPropertyGroup objects whose
properties entries are runtime-resolved property descriptors that include
AcDbPropertyAccessor objects. Each property object therefore
conforms to AcDbEntityRuntimeProperty.
Gets the proxy-entity class identifier.
Corresponds to DXF group code 90.
The class identifier assigned by the creating application.
Sets the proxy-entity class identifier.
Class identifier (DXF group code 90).
Gets the decoded proxy-graphics binary payload.
A copy of the stored bytes, or undefined when no graphics are
attached.
Gets the transparency level of this entity.
The transparency value.
Sets the transparency level of this entity.
The transparency value.
Gets the type name of this entity.
This method returns the entity type by removing the "AcDb" prefix from the constructor name.
The entity type name
Gets whether this entity is visible.
True if the entity is visible, false otherwise
Sets whether this entity is visible.
True to make the entity visible, false to hide it
ProtectedassignAssociates this object with a database. Subclasses may override database
and call this helper to avoid super setter restrictions.
Creates the extension dictionary for this object if it does not already exist.
This method closely mirrors the behavior of
AcDbObject::createExtensionDictionary() in ObjectARX.
The objectId of the extension dictionary
Writes DXF subclass fields for this proxy entity.
Emits the AcDbProxyEntity subclass marker followed by group codes 1,
3, 1001, 90, 91, 92, 10, 160, and 310 as
appropriate.
DXF output filer.
This entity for chaining.
Gets the value of the specified attribute.
This method will throw an exception if the specified attribute doesn't exist. Use getAttrWithoutException() if you want to handle missing attributes gracefully.
The name of the attribute to retrieve
The value of the specified attribute
Gets the value of the specified attribute without throwing an exception.
This method returns undefined if the specified attribute doesn't exist, making it safer for optional attributes.
The name of the attribute to retrieve
The value of the specified attribute, or undefined if it doesn't exist
ProtectedgetProtectedgetCreates the "General" property group for this entity.
This group contains common metadata attributes shared by all CAD entities (e.g., handle, layer). Each property includes a runtime AcDbPropertyAccessor allowing the property inspector to read and update live values.
Subclasses may override this method to append additional general-purpose properties while still preserving this base set.
A fully resolved property group containing runtime-accessible properties.
ProtectedgetRetrieves the XData associated with this object for a given application ID.
Extended Entity Data (XData) allows applications to attach arbitrary, application-specific data to an AcDbObject. Each XData entry is identified by a registered application name (AppId) and stored as an AcDbResultBuffer.
This method is conceptually equivalent to AcDbObject::xData() in ObjectARX,
but simplified to return the entire result buffer for the specified AppId.
The application ID (registered AppId name) that owns the XData
The AcDbResultBuffer associated with the AppId, or undefined
if no XData exists for that AppId
ProtectedhasProtectedhasProtectedhasLoads proxy-graphic bytes from DXF group codes 160 and 310.
Optionallength: numberExpected byte length from group code 160. When provided and positive, the result is truncated to this length.
OptionalhexChunks: string[]One or more hexadecimal strings from group code 310.
Removes the XData associated with the specified application ID.
After removal, calls to getXData() for the same AppId will return undefined.
If no XData exists for the given AppId, this method has no effect.
This mirrors the behavior of clearing XData for a specific application in ObjectARX rather than removing all XData from the object.
The application ID whose XData should be removed
Resolves the effective properties of this entity.
This method determines the final, usable values for entity properties such as layer, linetype, lineweight, color, and other display-related attributes. If a property is not explicitly set on the entity (for example, it is undefined or specified as ByLayer / ByBlock), the value is resolved according to the current AutoCAD system variables and drawing context.
Typical system variables involved in the resolution process include, but are not limited to:
CLAYER – Current layerCELTYPE – Current linetypeCELWEIGHT – Current lineweightCECOLOR – Current colorThe resolution follows AutoCAD semantics:
This method does not change user-defined property settings; it only computes and applies the final effective values used for display, selection, and downstream processing.
ProtectedresolveSets the value of an attribute.
The name of the attribute to set
Optionalval: AcDbObjectAttrs[A]The value to assign to the attribute
ProtectedsetReplaces the entity-origin anchor points stored on this proxy entity.
Each input point is cloned into an AcGePoint3d instance.
New origin points (DXF group codes 92 / 10).
Attaches or replaces XData for this object.
If XData already exists for the given AppId, it is replaced by the provided AcDbResultBuffer. The caller is responsible for ensuring that:
This method is conceptually similar to AcDbObject::setXData() in ObjectARX.
The result buffer containing the XData to attach
ProtectedshouldGets the grip points for this entity.
Grip points are the control points that can be used to modify the entity. This method should be overridden by subclasses to provide entity-specific grip points.
Array of grip points as 3D points
Gets the object snap points for this entity.
Object snap points are the points that can be used for precise positioning when drawing or editing. This method should be overridden by subclasses to provide entity-specific snap points.
The object snap mode
The pick point
The last point
Array to populate with snap points
OptionalgsMark: anyThe object id of subentity. For now, it is used by INSERT entity only. In AutoCAD, it uses AcGiSubEntityTraits::setSelectionMarkerInput to set GS marker of the subentity involved in the object snap operation. For now, we don't provide such a GS marker mechanism yet. So passed id of subentity as GS marker. Maybe this behavior will change in the future.
OptionalinsertionMat: AcGeMatrix3dCumulative insertion transform matrix from nested block references. This parameter is primarily used by INSERT entities.
Draws proxy graphics by decoding the binary stream and emitting primitives through the renderer.
This is the primary world-space draw entry point for proxy entities. It delegates to AcDbProxyGraphic.worldDraw using the entity database and layer as rendering context.
Target graphics renderer.
A grouped AcGiEntity when geometry was emitted, otherwise
undefined.
Transforms this proxy entity by the specified matrix.
Only entityOrigins are modified. The proxy-graphic byte stream is left unchanged because transforms are encoded as AcDbProxyGraphicType.PushMatrix / AcDbProxyGraphicType.PopMatrix commands inside the stream and applied at render time by AcDbProxyGraphic.
Transformation matrix to apply to entity origins.
This entity for chaining.
Called by cad application when it wants the entity to draw itself in WCS (World Coordinate System) and acts as a wrapper / dispatcher around subWorldDraw(). The children class should never overidde this method.
It executes the following logic:
The renderer to use for drawing
Optionaldelay: booleanThe flag to delay creating one rendered entity and just create one dummy entity. Renderer can delay heavy calculation operation to avoid blocking UI when this flag is true. For now, text and mtext entity supports this flag only. Other types of entities just ignore this flag.
The rendered entity, or undefined if drawing failed
Represents a proxy entity for custom objects not natively supported by the host application.
When AutoCAD loads a drawing that contains custom ObjectARX entities whose class definitions are unavailable, those objects are stored as
ACAD_PROXY_ENTITYrecords. Each proxy entity carries metadata about the original class and a binary proxy graphic stream that encodes drawable primitives (lines, arcs, text, and so on).subWorldDraw decodes that stream through AcDbProxyGraphic and renders the contained primitives via AcGiRenderer, allowing viewers such as cad-viewer to display third-party objects without the original ARX module.
See
https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-AcDbProxyEntity
Example