StatictypeRuntime type name used by the entity factory and RTTI helpers.
Gets the attributes object for this AcDbObject.
The AcCmObject instance containing all attributes
Indicates whether the MLINE is closed.
true when the Closed flag is set.
Enables or disables closed-loop behavior.
true to close the path, otherwise false.
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
DXF entity type token written to or read from drawing files.
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 raw MLINE bit flags.
Bitwise combination of AcDbMLineFlags.
Sets the raw MLINE bit flags.
Bitwise combination of AcDbMLineFlags.
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 current justification mode.
Justification enum value.
Sets the current justification mode.
Justification enum value.
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 MLINE plane normal.
Normal vector instance.
Sets the MLINE plane normal.
New normal vector.
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 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
Exposes editable property metadata for UI/property panels.
Entity property definition grouped by category.
Gets the RGB color of this entity.
This method handles the conversion of color indices (including ByLayer and ByBlock) to actual RGB colors. It resolves layer colors and block colors as needed.
The RGB color value as a number
Gets the global scale factor applied to style offsets.
MLINE scale.
Sets the global scale factor applied to style offsets.
MLINE scale.
Gets a deep-cloned snapshot of all segments. Mutating the returned array or objects will not affect internal state.
Cloned segment collection.
Replaces all segments using normalized internal copies.
Also updates the internal HasVertex flag.
Segment list to normalize and store.
Gets the MLINE start point in world coordinates.
Start point instance.
Sets the MLINE start point in world coordinates.
New start point.
Gets the number of style elements expected by the entity.
Style element count.
Sets the style element count.
Negative values are clamped to 0.
Requested style element count.
Gets the style name used to resolve the MLINE style object.
Current style name.
Sets the style name used to resolve the MLINE style object.
New style name.
Gets the handle of the referenced MLINESTYLE object.
Style object handle.
Sets the handle of the referenced MLINESTYLE object.
Style object handle.
Indicates whether end caps are suppressed during rendering.
true when the SuppressEndCaps flag is set.
Enables or disables end cap suppression.
true to suppress end caps.
Indicates whether start caps are suppressed during rendering.
true when the SuppressStartCaps flag is set.
Enables or disables start cap suppression.
true to suppress start caps.
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 the number of stored segment vertices.
Vertex count.
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
Appends one segment to the MLINE. The segment is normalized into internal geometry instances.
Segment payload to append.
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
Serializes MLINE-specific fields to the DXF filer.
DXF writer context.
The current entity instance.
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
ProtectedhasProtectedhasProtectedhasRemoves 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.
Sets the value of an attribute.
The name of the attribute to set
Optionalval: AcDbObjectAttrs[A]The value to assign to the attribute
ProtectedsetAttaches 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.
Renders this MLINE into one or more graphic interface entities. It draws optional fill first and then style element lines.
Active graphics renderer.
A single entity, an entity group, or undefined when nothing is drawable.
Applies a transformation matrix to the full MLINE geometry. Points are transformed directly, while vectors are transformed without introducing translation components.
Matrix to apply.
The same entity instance 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 the AutoCAD MLINE entity.