MLightCAD
    Preparing search index...

    Represents a single keyword option in a prompt, similar to Autodesk.AutoCAD.EditorInput.Keyword. Keywords can be shown to the user, used internally as global identifiers, and can be enabled/disabled or visible/hidden.

    Index

    Constructors

    • Creates a new Keyword.

      Parameters

      • displayName: string

        The text displayed to the user for this keyword.

      • OptionalglobalName: string

        The internal global name (never shown to user). Defaults to displayName.

      • OptionallocalName: string

        Internal local name (usually same as global name). Defaults to globalName.

      • enabled: boolean = true

        Whether the keyword is currently enabled. Default is true.

      • isReadOnly: boolean = false

        If true, the keyword properties cannot be modified. Default is false.

      • visible: boolean = true

        Whether the keyword is visible to the user. Default is true.

      Returns AcEdKeyword

    Accessors

    • get alias(): string

      As AutoCAD .NET API, you cannot specify a keyword alias the same way as ObjectARX (Yes _Y). There is no alias parameter in AdKeywordCollection.add.

      However, a different and implicit alias mechanism is provided as AutoCAD .NET API. The rule is the capital letters in the keyword global name define the alias.

      User can type:

      • Y → Yes
      • N → No
      • C → Cancel

      Multi-letter aliases You can control the alias length by capitalizing multiple letters:

      opts.keywords.add("WireFrame");   // alias = WF
      opts.keywords.add("HiddenLine"); // alias = HL
      opts.keywords.add("Realistic"); // alias = R

      User input:

      • WF
      • HL
      • R

      Returns string