Returns or sets the currently active view.
rhinoscriptsyntax.CurrentView (view=None, return_name=True)
rhinoscript.view.CurrentView (view=None, return_name=True)
view |
Optional. String or Guid. The title or identifier of the view to set current. If omitted, only the title or identifier of the current view is returned. |
return_name |
Optional. Boolean. If True (default), then the name, or title, of the view is returned. If False, then the identifier of the view is returned. |
String |
If the title is not specified, the title or identifier of the current view if successful. |
String |
If the title is specified, the title or identifier of the previous current view if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
previous = rs.CurrentView("Perspective")
print "The previous current view was ", previous
viewId = rs.CurrentView( return_name=False )
print "The identifier of the current view is ", viewId