ObjectsByLayer

Returns the identifiers of all objects based on the objects' layer.

Syntax

rhinoscriptsyntax.ObjectsByLayer (layer_name, select=False)

rhinoscript.selection.ObjectsByLayer (layer_name, select=False)

Parameters

layer_name

Required.  String.  The name of a layer.

select

Optional.  Boolean.  Select the objects.  If omitted, the objects are not selected (False).

Returns

List

A list of Guids identifying the objects if successful.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Pick any object")

if obj:

    layer = rs.ObjectLayer(obj)

    rs.ObjectsByLayer(layer, True)

Also See