BlockContainerCount

Returns the number of block definitions that contain a specified block definition.

Syntax

Rhino.BlockContainerCount (strBlock)

Parameters

strBlock

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

Returns

Number

The number of block definitions that contain the specified block definition if successful.

Null

If not successful, or on error.

Example

Dim strBlock, intCount

strBlock = Rhino.GetString("Block name to query")

If Rhino.IsBlock(strBlock) Then

intCount = Rhino.BlockContainerCount(strBlock)

Rhino.Print "This block is nested in " & CStr(intCount) & " block(s)."

End If

Also See

BlockContainers

IsBlock