Verifies that a block definition is being used by an inserted instance.
rhinoscriptsyntax.IsBlockInUse ( block_name, where_to_look=0 )
rhinoscript.block.IsBlockInUse ( block_name, where_to_look=0 )
block_name |
Required. String. The name of an existing block definition. |
||||||
where_to_look |
Optional. Number. Where to look, where:
|
Boolean |
True or false indicating success or failure. |
import rhinoscriptsyntax as rs
strBlock = rs.GetString("Block name")
if rs.IsBlock(strBlock):
if rs.IsBlockInUse(strBlock):
print "The block definition is in use."
else:
print "The block definition is not in use."
else:
print "The block definition does not exist."