Verifies that a toolbar (or toolbar group) exists in a currently open toolbar collection.
rhinoscriptsyntax.IsToolbar(name, toolbar, group=False)
name |
Required. String. The name of a currently open toolbar collection. |
toolbar |
Required. String. The name of a toolbar in the collection to verify. |
group |
Optional. Boolean. True if the toolbar parameter is refering to a toolbar group |
Boolean |
True or false indicating success or failure. |
import rhinoscriptsyntax as rs
file = "C:\\SteveBaer\\AppData\\Roaming\\McNeel\\Rhinoceros\\5.0\\UI\\default.rui"
name = rs.IsToolbarCollection(file)
if name:
if rs.IsToolbar(name, "Layer"):
print "The collection contains the Layer toolbar."
else:
print "The collection does not contain the Layer toolbar."