判断一个工具列组在一个已打开的工具列收藏夹中是否可见。
rhinoscriptsyntax.IsToolbarVisible(name, toolbar_group)
rhinoscript.toolbar.IsToolbarVisible(name, toolbar_group)
name |
必须参数。字符串。当前打开工具列收藏夹的名称。 |
toolbar_group |
必须参数。字符串。工具列收藏夹中要拿来判断的工具列组的名称。 |
布尔值 |
True 或 False 表示计算完成或失败。 |
None |
出错返回空值。 |
import rhinoscriptsyntax as rs
file = "C:\\SteveBaer\\AppData\\Roaming\\McNeel\\Rhinoceros\\5.0\\UI\\default.rui"
name = rs.IsToolbarCollection(file)
if name:
if rs.IsToolbarVisible(name, "Layer"): print "The Layer toolbar is visible."
else: print "The Layer toolbar is not visible."