VisibilityLayer

class VisibilityLayer
property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property visible

The layer visibility.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property inherited_visibility

The inherited layer visibility.

Type

bool, read-only

property locked

The layer lock state.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property inherited_locking

The inherited layer lock state.

Type

bool, read-only

property configured

If the layer is used in configuration or not.

Type

bool, read-only

property active

Visibility layer active state.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property model

The parent model of this layer.

Type

Model, read-only

property parent_layer

The parent layer of this layer or None if no parent.

Type

VisibilityLayer or None

Raises
  • ReadOnlyError -- If Database is in read only mode.

  • ValueError -- If trying to move the layer into one of its children or trying to move the layer to another model or trying to move the layer to itself.

list_child_layers(recursive = True)

List the child visibility layers of this layer.

Parameters

recursive (bool) -- If True, lists all child layers in this layer, otherwise only the direct child layers are returned.

Returns

The list of visibility layers of this layer.

Return type

list(VisibilityLayer)

create_visibility_layer(name)

Create a new child visibility layer of this layer.

Parameters

name (str) -- Name of the layer.

Returns

The newly created layer.

Return type

VisibilityLayer

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this visibility layer with its children.

Returns

The duplicated layer.

Return type

VisibilityLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this visibility layer

Note

By default, only empty layers can be deleted (NotEmptyError is raised otherwise), use force to force deletion of non empty layers.

Parameters

force (bool) -- Force the deletion of the layer even if it contains surfaces.

Raises
list_surfaces()

List the surfaces of this layer.

Returns

The list of surfaces of this layer.

Return type

list(Surface)