__init__ constructor

init

Initializes a new instance of Layer class.

def __init__(self):
    ...

init

Initializes a new Layer instance.

def __init__(self, name):
    ...
Parameter Type Description
name str The name of the layer.
Raises Description
ValueError When name is null or empty.

Example

from groupdocs.viewer.results import Layer

# Create a layer named "WALLS"
layer = Layer("WALLS")

init

Initializes a new Layer instance.

def __init__(self, name, visible):
    ...
Parameter Type Description
name str The name of the layer.
visible bool The layer visibility indicator.
Raises Description
ValueError If name is None or empty.

Example

from groupdocs.viewer.results import Layer

# Render specific layers in a CAD drawing
layers = [
    Layer("WALLS"),
    Layer("RACKS", visible=True)
]

See Also