bdeSetPortPosition
Sets the position of a port label. For position there are three options that can be used: hwdc::Position, a string of which side to place the port and using doubles for the x and y position.
Syntax
bdeSetPortPosition(port, position)
bdeSetPortPosition(port, x, y)
Inputs
- port
- The port that will have it's position set.
- position
- The position to set for the port. Can use the strings 'top', 'bottom', 'left', 'right'.
- xPos
- The x position to set for the port.
- yPos
- The x position to set for the port.
Examples
Set the position of a port:
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
portList = bdeGetPortsOnBlock(block);
portX = portList{[1, 1]};
bdeSetPortPosition(portX, 'left');
Set the position of a port:
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
portList = bdeGetPortsOnBlock(block);
portX = portList{[1, 1]};
bdeSetPortPosition(portX, 1, 1);