判断一个图块定义是否来自于一个参考文件。
rhinocsriptsyntax.IsBlockReference (block_name)
rhinocsript.block.IsBlockReference (block_name)
block_name |
必须参数。字符串。现有图块定义的名称。 |
布尔值 |
True 或 False 表示计算完成或失败。 |
import rhinoscriptsyntax as rs
strBlock = rs.GetString("Block name")
if rs.IsBlock(strBlock):
if rs.IsBlockReference(strBlock):
print "The block definition is a reference definition."
else:
print "The block definition is not a reference definition."
else:
print "The block definition does not exist."