ts-visio - v1.16.27
    Preparing search index...

    Class Layer

    A named display layer on a Visio page.

    Layers control the visibility and printability of groups of shapes. Obtain instances via page.getLayers() or page.addLayer().

    const annotations = await page.addLayer('Annotations');
    ann.setVisible(false); // hide all shapes on this layer
    Index

    Constructors

    • Parameters

      • name: string
      • index: number
      • OptionalpageId: string
      • Optionalpkg: VisioPackage
      • Optionalmodifier: ShapeModifier
      • _visible: boolean = true
      • _locked: boolean = false
      • _print: boolean = true

      Returns Layer

    Properties

    index: number
    name: string

    Accessors

    • get locked(): boolean

      Whether the layer is currently locked.

      Returns boolean

    • get print(): boolean

      Whether shapes on this layer are included when printing.

      Returns boolean

    • get visible(): boolean

      Whether the layer is currently visible.

      Returns boolean

    Methods

    • Delete this layer from the page. Removes the layer definition and strips it from all shape LayerMember cells.

      Returns Promise<void>

    • Rename this layer.

      Parameters

      • newName: string

      Returns Promise<Layer>

    • Parameters

      • locked: boolean

      Returns Promise<Layer>

    • Parameters

      • visible: boolean

      Returns Promise<Layer>