ToolbarCount

Returns the number of toolbars or groups found in a currently open toolbar collection file.

Syntax

rhinoscriptsyntax.ToolbarCount(name, groups=False)

Parameters

name

Required.  String.  The name of a currently open toolbar collection.

groups

Optional.  Boolean.  If true, return the number of toolbar groups in the file, other the number of toolbars in the file

Returns

Number

The number of toolbars (or groups) in the toolbar collection if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

names = rs.ToolbarCollectionNames()

if names:

    count = rs.ToolbarCount(names[0])

    print "The", names[0], " collection contains", count, " toolbars."

Also See

HideToolbar

IsToolbar

IsToolbarVisible

ShowToolbar

ToolbarNames