Returns the identifiers of all objects based on the objects' user-assigned name.
rhinosriptsyntax.ObjectsByName (name, select=False, include_lights=False)
rhinosript.selection.ObjectsByName (name, select=False, include_lights=False)
name |
Required. String. The name of an object or objects. |
select |
Optional. Boolean. Select the objects. If omitted, the objects are not selected (False). |
include_lights |
Optional. Boolean. Include light objects. If omitted, light objects are not returned (False). |
List |
A list of Guids identifying the objects if successful. |
import rhinoscriptsyntax as rs
name = rs.GetString("Name to select")
if name: rs.ObjectsByName(name,True)