Page class

Page class

Contains elements that define a page in the document.

The Page type exposes the following members:

Constructors

Constructor Description
Page() Constructor.
Page(id) Constructor.

Properties

Property Description
pages Page collection.
shapes Shape collection.
page_sheet Contains elements that define the page sheet for a Page or Master element.
connects Contains a Connect element for each connection between two shapes in a drawing.
id The unique ID of the element within its parent element.
name The name of the element.
name_u The universal name of the element.
background A flag indicating if the page is a background page.
back_page The page’s background page.
view_scale The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150%, and so on.
view_center_x ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.
view_center_y ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.
reviewer_id The ID of the reviewer associated with the markup overlay.
associated_page The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.

Methods

Method Description
add_shape(pin_x, pin_y, master_name) Adds shape created by master on page with defined PinX and PinY.
add_shape(pin_x, pin_y, width, height, master_name) Adds shape created by master on page with defined PinX,PinY,Width and Height.
add_shape(pin_x, pin_y, width, height, image_stream, object_data_stream)
add_shape(pin_x, pin_y, width, height, stream)
add_shape(new_shape, master_name) Adds shape created by master to specific page.
connect_shapes_via_connector(shape_from, place_from, shape_to, place_to, connector) Connect shapes via connector.
connect_shapes_via_connector(shape_from_id, place_from, shape_to_id, place_to, connector_id) Connect shapes via connector.
connect_shapes_via_connector(shape_from_id, from_connection_name, shape_to_id, to_connection_name, connector_id) Connect shapes via connector.
connect_shapes_via_connector_index(shape_from_id, from_index, shape_to_id, to_index, connector_id) Connect shapes via connector index.
connect_shapes_via_connector_index(shape_from, from_index, shape_to, to_index, connector) Connect shapes via connector index.
glue_shapes(shape_from, place_to, shape_to) Glue shapes.
glue_shapes(shape_from_id, place_to, shape_to_id) Glue shapes
glue_shapes_in_container(shape_from_id, shape_to_begin_connection_name, shape_to_end_connection_name, shape_to_id) Glue shapes in container using connection name
glue_shapes_in_container(shape_from_id, shape_to_begin_connection_index, shape_to_end_connection_index, shape_to_id) Glue shapes in container
add_comment(shape_id, comment) Adds comment to a shape with shape’s id.
add_comment(shape, comment) Adds comment to a shape.
add_comment(pin_x, pin_y, comment) Adds comment with defined PinX and PinY.
add_text(pin_x, pin_y, width, height, text, font_name, font_color, size) Adds Text with defined PinX and PinY.
add_text(pin_x, pin_y, width, height, text) Adds Text with defined PinX and PinY.
draw_line(begin_x, begin_y, end_x, end_y) The process of drawing a single line.
draw_line(pin_x, pin_y, width, height, points) The process of drawing line.
center_drawing() Centers a page’s shapes with respect to the extent of the page.
Centering shapes does not change their position relative to each other.
copy(source)
apply_style(text_style, line_style, fill_style) Applies style for full page.
move_to(index) Moves the page to another location in the pages.
add_active_x_control(type, pin_x, pin_y, width, height) Creates an Activex Control.
layout(options) Lays out the shapes and/or reroutes the connectors for the page.
glue_shape_to_connector_begin_x(shape_from_id, connection_name, connector_id) Glue shape to Connector’s BeginX
glue_shape_to_connector_end_x(shape_to_id, connection_name, connector_id) Glue shape to Connector’s EndX
glue_shapes_in_container_by_id(shape_from_id, shape_to_begin_connection_id, shape_to_end_connection_id, shape_to_id) Glue shapes by connection id in container
bring_forward(shape_id) Brings a shape,defined by ID, forward one position in the z-order.
send_backward(shape_id) Moves a shape,defined by ID, back one position in the z-order.
bring_to_front(shape_id) Brings a shape,defined by ID, to the front of the z-order.
send_to_back(shape_id) Moves a shape,defined by ID, to the back of the z-order.
auto_space_shapes(shapes, options) Auto space shapes
draw_rectangle(pin_x, pin_y, width, height) The process of drawing rectangle.
draw_ellipse(pin_x, pin_y, width, height) The process of drawing Ellipse.
draw_polyline(pin_x, pin_y, width, height, points) The process of drawing polyline.
draw_bezier(pin_x, pin_y, width, height, points) The process of drawing bezier.
The length of points should be equal or greater than 3.
draw_spline(pin_x, pin_y, width, height, points) The process of drawing spline.

See Also