LayerView

class py3dm.LayerView

Tiny wrapper to read-only access Layer (ON_Layer) objects.

property color: tuple[int, int, int, int]
property iges_level: int
property is_expanded: bool
property is_locked: bool
property is_visible: bool
property layer_uuid: uuid.UUID
property line_type_index: int
property name: str
property parent_uuid: uuid.UUID
property parent_uuid_is_not_null: bool
property parent_uuid_is_null: bool
property path_separator: str
property plot_color: tuple[int, int, int, int]
property plot_weight: float
property render_material_index: int
index() int
index(unset_index_value: int) int

Value of the runtime model component index attribute.

Parameters:

unset_index_value (int) – Value to return if the index has not been set. ON_UNSET_INT_INDEX or indices of default components are often used for this parameter.

Notes

If the component is in a model, then the index is unique for all components of identical type in the model and is locked. If the index has not been set, unset_index_value is returned. The index() value can change when saved in an archive (.3dm file). Use the get_uuid() when you need to reference model components in an archive.

is_valid(text_log: TextLog | None = None) bool