ViewNames

Returns the names, or titles, or identifiers of all views in the document.

Syntax

rhinoscriptsyntax.ViewNames (return_names=True, view_type=0)

rhinoscript.view.ViewNames (return_names=True, view_type=0)

Parameters

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:

Value

Description

0

Standard model views.

1

Page layout views.

2

Both standard model and page layout views.

Returns

List

A array of strings identifying the view names, or titles, or identifiers if successful.

None

If not successful, or on error.

Example

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)

Also See

IsView

ViewTitle