bdeGetBlockByFullName

Gets block by the given blockname. Has an option to use diagram as well.

Syntax

block = bdeGetBlockByFullName(blockname, isrootincluded)

block = bdeGetBlockByFullName(diagram, blockname)

Inputs

blockname
The name of the block.
Type: string
diagram
The diagram that the block is in.
Type: diagram
isrootincluded
Whether or not the root is included within the blockname.
Type: Boolean

Outputs

block
The block that is returned.
Type: block

Examples

Get a block from it's full name, without the root included:

          block = bdeGetBlockByFullName('blockname', false)
        

          block = hwscpHyperBlock
        
Get a block from it's full name, including the root:

          block = bdeGetBlockByFullName('Root/blockname', true)
        

          block = hwscpHyperBlock
        
Get a block from it's full name, using a diagram:

          diagram = bdeGetCurrentDiagram();
          block = bdeGetBlockByFullName(diagram, 'blockname')
        

          block = hwscpHyperBlock