Interface that all of display objects need to implement.

interface AcGiEntity {
    get layerName(): string;
    set layerName(value: string): void;
    get objectId(): string;
    set objectId(value: string): void;
    get ownerId(): string;
    set ownerId(value: string): void;
    get userData(): object;
    set userData(value: object): void;
    get visible(): boolean;
    set visible(value: boolean): void;
    applyMatrix(matrix: AcGeMatrix3d): void;
    fastDeepClone(): AcGiEntity;
    highlight(): void;
    unhighlight(): void;
}

Accessors

  • get layerName(): string
  • The name of the layer referenced by this entity

    Returns string

  • set layerName(value: string): void
  • Parameters

    • value: string

    Returns void

  • get objectId(): string
  • Object id of the associated entity in drawing database. When adding this entity into scene, do remember setting the value of this property.

    Returns string

  • set objectId(value: string): void
  • Parameters

    • value: string

    Returns void

  • get ownerId(): string
  • The object Id of the owner of the object. When adding this entity into scene, do remember setting the value of this property.

    Returns string

  • set ownerId(value: string): void
  • Parameters

    • value: string

    Returns void

  • get userData(): object
  • An object that can be used to store custom data about the entity.

    Returns object

  • set userData(value: object): void
  • Parameters

    • value: object

    Returns void

  • get visible(): boolean
  • Object's visibility

    Returns boolean

  • set visible(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

Methods

  • Apply the matrix transform to the object and updates the object's position, rotation and scale.

    Parameters

    Returns void

  • Return a clone of this object and its direct children (not all descendants). So it means that you need to gurantee the object is flatten by call method 'flatten' before calling this function. This function will deeply clone geometry in this object. But materials are reused directly and not deeply cloned.

    Returns AcGiEntity

    Return a clone of this object and optionally all descendants.

  • Unhighlight this entity

    Returns void