Returns the number of toolbars or groups found in a currently open toolbar collection file.
rhinoscriptsyntax.ToolbarCount(name, groups=False)
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 |
Number |
The number of toolbars (or groups) in the toolbar collection if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
names = rs.ToolbarCollectionNames()
if names:
count = rs.ToolbarCount(names[0])
print "The", names[0], " collection contains", count, " toolbars."