判断一个物件是否为图块引例。
rhinocriptsyntax.IsBlockInstance (object_id)
rhinocript.block.IsBlockInstance (object_id)
object_id |
必须参数。字符串或 Guid。现有图块定义的 ID 。 |
布尔值 |
True 或 False 表示计算完成或失败。 |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select block instance")
if rs.IsBlockInstance(obj):
print "The object is a block instance."
else:
print "The object is not a block instance."