Constructors

Properties

DEFAULT_ANNOTATION_COLOR: AcCmColor = ...

Default annotation color is red

DEFAULT_ANNOTATION_LINE_WEIGHT: AcGiLineWeight = AcGiLineWeight.LineWeight100

Methods

  • Finds or creates a annotation layer identified by MLightCAD-specific XData.

    This method enforces the concept of a singleton annotation layer in a drawing. It first scans all existing layers and looks for one whose XData contains a description value of "mlightcad" under the registered application name "mlightcad".

    Behavior:

    • If such a layer already exists, its name is returned and no new layer is created.
    • If no matching layer is found, a new layer is created with:
      • A unique name using the prefix "$revision_" followed by a numeric index (e.g. $revision_1, $revision_2, …)
      • Yellow color (ACI = 2)
      • Layer turned on and plottable
      • XData attached to mark it as an MLightCAD annotation layer

    XData layout:

    • RegApp name: "mlightcad"
    • Description (ASCII string): "mlightcad"

    The attached XData allows the annotation layer to be reliably identified even if the layer is renamed by the user.

    Returns string

    The name of the existing or newly created annotation layer.

  • Returns true if the specified object contains annotation xdata, which means it is only object created by annotation related commands.

    Parameters

    • object: AcDbObject

      Object to check whether it contains annotation xdata.

    Returns boolean

    Returns true if the specified object contains annotation xdata.