insert_connector method

insert_connector

Creates a new connector shape and inserts it into the shape collection at the specified index, applying default template styling.

Returns

The newly created IConnector.

def insert_connector(self, index, shape_type, x, y, width, height):
    ...
ParameterTypeDescription
indexintThe zero-based index at which to insert the connector shape.
shape_typeShapeTypeThe ShapeType of the connector shape to insert.
xfloatThe x-coordinate of the connector’s frame, in points.
yfloatThe y-coordinate of the connector’s frame, in points.
widthfloatThe width of the connector’s frame, in points.
heightfloatThe height of the connector’s frame, in points.

insert_connector

Creates a new connector shape and inserts it into the shape collection at the specified index, optionally applying default template styling.

Returns

The newly created IConnector.

def insert_connector(self, index, shape_type, x, y, width, height, create_from_template):
    ...
ParameterTypeDescription
indexintThe zero-based index at which to insert the connector shape.
shape_typeShapeTypeThe ShapeType of the connector shape to insert.
xfloatThe x-coordinate of the connector’s frame, in points.
yfloatThe y-coordinate of the connector’s frame, in points.
widthfloatThe width of the connector’s frame, in points.
heightfloatThe height of the connector’s frame, in points.
create_from_templateboolTrue to apply default template styling (non-empty name, simple style);

false to create the connector with default property values.

See Also