bdeCreateBlock
Creates a block using blockid along with parent. Parent can be of type hwscpDiagram or hwscpBlock but hwscpBlock is not available as a return type from other commands.
Syntax
block = bdeCreateBlock(blockid, parentBlock)
block = bdeCreateBlock(blockid, parentDiagram)
Inputs
- blockid
- The id of the block type to be used. A block's id can be seen from hovering over the block with cursor. If this doesn't happen go to file->preferences->tooltips and check show tooltips on blocks.
- parentDiagram
- The container diagram that the block is in going to be created in.
- parentBlock
- Is of type hwscpBlock which is unavailable as a return type. The parent container block the newly created block will be a part of.
Outputs
- block
- The block that is created.
Examples
diagram = bdeGetCurrentDiagram()
block = bdeCreateBlock('system/MathOperations/Sum', diagram)
block = hwscpHyperBlock