Returns or changes the layout or model space of an object.
rhinoscriptsyntax.ObjectLayout (object_id, layout=None, return_name=True)
rhinoscript.object.ObjectLayout (object_id, layout=None, return_name=True)
object_id |
Required. String or Guid. The identifier of the object. |
layout |
Optional. String. To change, or move, an object from model space to page layout space, or from one page layout to another, then specify the title or identifier of an existing page layout view. To move an object from page layout space to model space, just specify None. |
return_name |
Optional. Boolean. If True (default), then the name, or title, of the page layout view is returned. If False, then the identifier of the page layout view is returned. |
String |
If layout is not specified, the object's current page layout view if successful. Note, if the object is not in page layout space, None is returned. |
String |
If layout is specified, the object's previous page layout view if successful. Note, if the object was not in page layout space, None is returned. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if obj: rs.ObjectLayout(obj, "Page 1")