判断一个工具列(或工具列组)是否存在于一个已打开工具列收藏夹中。
rhinoscriptsyntax.IsToolbar(name, toolbar, group=False)
name |
必须参数。字符串。当前打开工具列收藏夹的名称。 |
toolbar |
必须参数。字符串。要判断工具列的名称。 |
group |
可选参数。布尔值。toolbar 参数是否为工具列组。 |
布尔值 |
True 或 False 表示计算完成或失败。 |
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."