Returns the identifiers of all objects based on the objects' layer.
rhinoscriptsyntax.ObjectsByLayer (layer_name, select=False)
rhinoscript.selection.ObjectsByLayer (layer_name, select=False)
layer_name |
Required. String. The name of a layer. |
select |
Optional. Boolean. Select the objects. If omitted, the objects are not selected (False). |
List |
A list of Guids identifying the objects if successful. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Pick any object")
if obj:
layer = rs.ObjectLayer(obj)
rs.ObjectsByLayer(layer, True)