FirstObject

Returns the identifier of the first object in the document.  The first object in the document is the last object created by the user.

Syntax

rhinoscriptsyntax.FirstObject ( select=False, include_lights=False, include_grips=False)

rhinoscript.selection.FirstObject ( select=False, include_lights=False, include_grips=False)

Parameters

select

Optional.  Boolean.  Select the object.  If omitted, the object is not selected (False).

include_lights

Optional.  Boolean.  Include light objects.  If omitted, light objects are not returned (False).

include_grips

Optional.  Boolean.  Include grips objects.  If omitted, grips objects are not returned (False).

Returns

Guid

The identifier of the object if successful.

Example

import rhinoscriptsyntax as rs

rs.AddLine( (0,0,0), (5,5,0) )

rs.AddLine( (0,0,0), (5,0,0) )

rs.AddLine( (0,0,0), (0,5,0) )

objectId = rs.FirstObject()

print "Object identifier: ", objectId

rs.SelectObject(objectId)

Also See

LastObject

NextObject