add_shape method

add_shape(new_shape, master_name, page_number)

Adds shape created by master to specific page.

Returns

The unique ID of the shape within shapes collection on the specified page.

def add_shape(self, new_shape, master_name, page_number):
    ...
ParameterTypeDescription
new_shapeShapeNew shape objectShape.
master_namestrMaster’s name.
page_numberintIndex of page.

add_shape(pin_x, pin_y, master_name, page_number)

Adds shape created by master on page with defined PinX and PinY.

Returns

The unique ID of the shape within shapes collection on the specified page.

def add_shape(self, pin_x, pin_y, master_name, page_number):
    ...
ParameterTypeDescription
pin_xfloatSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pin_yfloatSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
master_namestrMaster’s name.
page_numberintIndex of page.

add_shape(pin_x, pin_y, width, height, master_name, page_number)

Adds shape created by master on page with defined PinX,PinY,Width and Height.

Returns

The unique ID of the shape within shapes collection on the specified page.

def add_shape(self, pin_x, pin_y, width, height, master_name, page_number):
    ...
ParameterTypeDescription
pin_xfloatSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pin_yfloatSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthfloatSpecifies the width of the shape in inches.
heightfloatSpecifies the height of the shape in inches.
master_namestrMaster’s name.
page_numberintIndex of page.

See Also