bdeCreatePort
Creates a new port for a given block.
Syntax
newPort = bdeCreatePort(block, varType, ioType, portType, portSide, shape)
Inputs
- block
- The block to create a new block for.
- varType
- The variable type of the port. Has options of either variableport or fixedport. Variable port allows for multiple ports on a given side of a block. Fixed port means the block can only have one input and output port.
- ioType
- The input/output type of the port. Options are input or output.
- portType
- The type of the port. Options are activation, explicit, implicit, and bus.
- portSide
- The side that the port will be placed on the block. Options are left, right, top, bottom. Can also use an argument of the type hwdc::Position.
- shape
- The shape to set for the port. Options are triangle, rectangle, and ellipse.
Outputs
- newPort
- The newly created port.
Examples
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
newPort = bdeCreatePort(block, 'fixedport', 'input', 'explicit', 'left', 'triangle')
newPort = hwdcConnectionPoint