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.

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 globalName(): string

    Gets or sets the global name of the keyword. The global name is used internally by programs and is never displayed to the user. Setting has no effect if isReadOnly is true.

    Returns string

  • set globalName(name: string): void

    Parameters

    • name: string

    Returns void

  • get isReadOnly(): boolean

    Gets a value indicating whether the keyword is read-only. True if the keyword is read-only; otherwise, false.

    Returns boolean

  • get visible(): boolean

    Gets or sets whether the keyword is visible to the user. Hidden keywords cannot be selected by typing, but can be used programmatically. Setting has no effect if isReadOnly is true.

    Returns boolean

  • set visible(flag: boolean): void

    Parameters

    • flag: boolean

    Returns void