The Page object is used to get information about and control the contents of a ConceptDraw document's page. The methods and properties of the Page object allow to create on the page simple shapes, groups, service objects and other objects, as well as control existing objects.
BackPageID | The background page ID (the ID property). |
Document | The document which contains this page. |
ID | The page ID. |
IsBackground | The flag that specifies whether this page can be a background page. |
Name | The page name. |
ArcTo | Creates an arc. |
BeginShape | Returns the current shape, being edited (the current Basic shape). |
ConvertToGroup | Converts a Vector Picture to a group. |
ConvertToVFPicture | Converts a shape to a Vector Picture. |
DrawConnector | Creates a connector. |
DrawGroup | Creates a group. |
DrawGuide | Creates the Guide service object. |
DrawLine | Creates a line. |
DrawOval | Creates an ellipse. |
DrawRect | Creates a rectangle. |
DrawSector | Creates a sector of a circle or ellipse. |
DrawSmartConnector | Creates a Smart Connector. |
DrawStamp | Draws a copy of the specified shape with the specified size and position, same as the Stamp tool in ConceptDraw. |
DrawStampSelection | Draws copies of all selected shapes with the specified size and position, same as the Stamp tool in ConceptDraw. |
DropStamp | Creates a copy of the shape, same as the Stamp tool in ConceptDraw, preserving the size of the original shape. |
DropStampSelection | Creates copies of all selected shapes, same as the Stamp tool in ConceptDraw, preserving the size of the original shapes. |
EndShape | Notifies when creation of the shape is finished. |
InsertPicture | Inserts a picture from a file onto the page. |
LineTo | Creates a line in the current Basic shape for this page. |
MoveTo | Specifies the position of the current point of the shape, used for creating it. |
RemoveAllServObjs | Removes all service objects on the page. |
RemoveAllShapes | Removes all shapes on the page. |
RemoveServObj | Removes a service object by its index in the service object collection of the document. |
RemoveServObjByID | Removes a service object by its ID (the ID property). |
RemoveShape | Removes a shape by its index in the shape collection of the page. |
RemoveShapeByID | Removes a shape by its ID (the ID property). |
ReorderServObj | Moves the service object to the specified position in the
service object collection of the page. The service object to be repositioned is indicated by its index. |
ReorderServObjByID | Moves the service object to the specified position in the
service object collection of the page. The service object to be repositioned is indicated by its ID (the ID property). |
ReorderShape | Moves the shape to the specified position in the shape
collection of the page. |
ReorderShapeByID | Moves the shape to the specified position in the shape collection
of the page. The shape to be repositioned is indicated by its ID (the ID property). |
ServObj | Returns a service object by its index in the service object collection of the page. |
ServObjByID | Returns a service object by the specified unique number (the ID property) of the service object. |
ServObjsNum | Returns the number of service objects on the page. |
Shape | Returns a shape by its index in the shape collection of the page. |
ShapeByID | Returns a shape by its unique number (the ID property). |
ShapesNum | Returns the number of shapes on the page. |
SplineStart | Adds the Spline start segment to the shape. |
SplineTo | Draws a spline in the shape. |
Pages can be stored only inside a ConceptDraw document. Each ConceptDraw document contains its own page collection which can be controlled by using the methods and properties of the Document object. However, the Document object is not the only way to get an instance of the Page object, as various objects (service objects and regular shapes) can reference to the page to which they belong.
Methods for drawing shapes on the page are similar to those used for drawing shapes in a group, as the page is in fact a parent object for shapes, as the group is. The coordinate system of the page is at the highest level and is referred to as "global" in ConceptDraw. The methods of the Page object allow to work with all types of ConceptDraw objects that can exist on a document page. All objects that belong to a page are stored in two collections - regular shapes and service objects. The Page object has corresponding groups of methods for working with these collections (see above).
An instance of the Page object can be retrieved by using the
following methods and properties:
Document object: ActivePage
property, AddPage method, Page
method, PageByID method.
SerbObj, Shape objects: Page
property.
Window object: Page property.
Also an instance of the Page object can be retrieved by using the thisDoc global variable, pre-defined at the page and shape script levels. The thisDoc variable in the page-level script returns the page which script is being executed when the variable is referred to. For the shape-level script it returns the page, to which belongs the shape, which script is being executed.
See Also |
Document object, ServObj object, Shape object |