pytha.set_element_layer - pytha-3d-cad/pytha-lua-api GitHub Wiki

Puts a single element or a table of elements into a layer.

Similar to the Attributes -> Layer function in the PYTHA user interface.

pytha.set_element_layer(element, layer) 
Parameter Type Description
element element_handle or {...} A single element handle or a table of element handles
layer integer Layer number. Must be between 1 and 256

As groups do not have a layer property, the function will assign all parts descending from that group to the given layer.

See also:

pytha, element handles, set_element_attributes, set_element_name, set_element_material