IsBlockInUse

Verifies that a block definition is being used by an inserted instance.

Syntax

rhinoscriptsyntax.IsBlockInUse ( block_name, where_to_look=0 )

rhinoscript.block.IsBlockInUse ( block_name, where_to_look=0 )

Parameters

block_name

Required.  String.  The name of an existing block definition.

where_to_look

Optional.  Number.  Where to look, where:

0 (Default)

Check for top level references in active document

1

Check for top level and nested references in active document

2

Check for references in other instance definitions

Returns

Boolean

True or false indicating success or failure.

Example

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."

Also See

IsBlock

IsBlockInstance

IsBlockEmbedded

IsBlockReference