
## Layer class

Contains elements that define a single layer and its properties for a page.

```js
new Layer()
```

Constructor.

## Methods

| Name | Description |
| --- | --- |
| [getActive()](#getactive) | Specifies whether a layer is active. Shapes that are not preassigned to layers are assigned to the active layer(s) when  |
| [getColor()](#getcolor) | The index of the color in the color table used toThe index of the color in the color table used to display the layer or  |
| [getColorTrans()](#getcolortrans) | Determines the degree of transparency for a layer or shape's text color, from 0 (completely opaque) to 1 (completely tra |
| [getDel()](#getdel) | A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted loca |
| [getGlue()](#getglue) | Specifies whether shapes belonging to the layer can be glued to. |
| [getIX()](#getix) | The zero-based index of the element within its parent element. |
| [getLock()](#getlock) | Specifies whether shapes belonging to the layer are locked against being selected or edited. |
| [getName()](#getname) | Name element specifies the name of a layer. |
| [getNameUniv()](#getnameuniv) | Specifies the universal name of a layer. |
| [getPrint()](#getprint) | Specifies whether shapes belonging to the layer are printed when the drawing is printed. |
| [getSnap()](#getsnap) | Specifies whether other shapes can snap to shapes assigned to the layer. Shapes assigned to the layer can snap to other  |
| [getStatus()](#getstatus) | Specifies whether the layer is a valid layer for a document. |
| [getVisible()](#getvisible) | Specifies whether shapes belonging to the layer are visible on the drawing page. |
| [isColorChecked()](#iscolorchecked) | A flag indicating whether the element has been checked locally. A value of 1 indicates that the element was checked loca |
| [setColorChecked()](#setcolorchecked) | A flag indicating whether the element has been checked locally. A value of 1 indicates that the element was checked loca |
| [setDel()](#setdel) | A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted loca |
| [setIX()](#setix) | The zero-based index of the element within its parent element. |

### getActive() {#getactive}

Specifies whether a layer is active. Shapes that are not preassigned to layers are assigned to the active layer(s) when dropped on the drawing page.

### getColor() {#getcolor}

The index of the color in the color table used toThe index of the color in the color table used to display the layer or An RGB value specifying a custom color not in the color table (for example, #ff9900 ). display the layer

### getColorTrans() {#getcolortrans}

Determines the degree of transparency for a layer or shape's text color, from 0 (completely opaque) to 1 (completely transparent).

### getDel() {#getdel}

A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted locally. The value of the property is BOOL integer constant.

### getGlue() {#getglue}

Specifies whether shapes belonging to the layer can be glued to.

### getIX() {#getix}

The zero-based index of the element within its parent element.

### getLock() {#getlock}

Specifies whether shapes belonging to the layer are locked against being selected or edited.

### getName() {#getname}

Name element specifies the name of a layer.

### getNameUniv() {#getnameuniv}

Specifies the universal name of a layer.

### getPrint() {#getprint}

Specifies whether shapes belonging to the layer are printed when the drawing is printed.

### getSnap() {#getsnap}

Specifies whether other shapes can snap to shapes assigned to the layer. Shapes assigned to the layer can snap to other shapes, but other shapes cannot snap to them.

### getStatus() {#getstatus}

Specifies whether the layer is a valid layer for a document.

### getVisible() {#getvisible}

Specifies whether shapes belonging to the layer are visible on the drawing page.

### isColorChecked() {#iscolorchecked}

A flag indicating whether the element has been checked locally. A value of 1 indicates that the element was checked locally. The value of the property is BOOL integer constant.

### setColorChecked() {#setcolorchecked}

A flag indicating whether the element has been checked locally. A value of 1 indicates that the element was checked locally. The value of the property is BOOL integer constant.

### setDel() {#setdel}

A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted locally. The value of the property is BOOL integer constant.

### setIX() {#setix}

The zero-based index of the element within its parent element.
