IsLayerCurrent

判断一个图层是否为当前图层。

语法

rhinoscriptsyntax.IsLayerCurrent (layer)

rhinoscript.layer.IsLayerCurrent (layer)

参数

layer

必须参数。字符串或 Guid。现有图层的名称。

返回值

True

如果判断成功。

False

如果判断不成功。

示例

import rhinoscriptsyntax as rs

layer = rs.GetString("Layer name")

if rs.IsLayer(layer):

    if rs.IsLayerCurrent(layer): print "The layer is current."

    else: print "The layer is not current."

else:

    print "The layer does not exist."

同见

IsLayer

IsLayerEmpty

IsLayerLocked

IsLayerOn

IsLayerReference

IsLayerSelectable

IsLayerVisible