insert_auto_shape method

insert_auto_shape

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

Returns

The newly created IAutoShape.

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

insert_auto_shape

Creates a new auto shape and inserts it into the shape collection at the specified index, optionally initializing it with default template styling.

Returns

The newly created IAutoShape.

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

false to create the shape with all properties set to their defaults.

See Also