Returns the names, or titles, or identifiers of all views in the document.
rhinoscriptsyntax.ViewNames (return_names=True, view_type=0)
rhinoscript.view.ViewNames (return_names=True, view_type=0)
return_names |
Optional. Boolean. If True (default), then the names, or titles, of the views are returned. If False, then the identifiers of the views are returned. |
||||||||
view_type |
Optional. Number. The type of view to return, where:
|
List |
A array of strings identifying the view names, or titles, or identifiers if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
# Print view names
views = rs.ViewNames()
if views:
for view in views: print view
# Print view identifiers
view_ids = rs.ViewNames(False)
if view_ids:
for id in view_ids:
print id, " = ", rs.ViewTitle(id)