Returns the number of block definitions that contain a specified block definition.
rhinoscriptsyntax.BlockContainerCount(block_name)
rhinoscript.block.BlockContainerCount(block_name)
block_name |
Required. String. The name of an existing block definition. |
Number |
The number of block definitions that contain the specified block definition if successful. |
import rhinoscriptscriptsyntax as rs
block = rs.GetString("Block name to query")
if rs.IsBlock(block):
count = rs.BlockContainerCount(block)
print "This block is nested in", count, "block(s)."