document.viewports[ ].Layers[]
This property gives access to layer attributes within a viewport but it can not be used directly. It is assumed that myDoc has already been defined as a document and set as the activeDoc for the following examples.
document.viewports[].Layer[].Name
Returns and sets the name of a layer within a viewport as string.
myDoc.viewports[1].Layers[1].Name = "Lyr1"
document.viewports[].Layers[].locked
Returns and sets the locked state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].locked = true
document.viewports[].Layers[].protected
Returns and sets the protected state of a layer within a viewport as boolean.
document.viewports[].Layers[].active
myDoc.viewports[1].Layers[1].protected = true
Returns and sets the active state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].active = true
document.viewports[].Layers[].printable
Returns and sets the printable state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].printable = true
document.viewports[].Layers[].exportable
Returns and sets the exportable state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].exportable = true
document.viewports[].Layers[].visible
Returns and sets the visible state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].visible = true
document.viewports[].Layers[].useColor
Returns and sets the use of color property of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].useColor = true
This property gives access to layer attributes within a viewport but it can not be used directly. It is assumed that myDoc has already been defined as a document and set as the activeDoc for the following examples.