Visio.Page class

Represents the Page class.

[ API set: 1.1 ]

Extends

Properties

allShapes

All shapes in the Page, including subshapes. Read-only.

[ API set: 1.1 ]

comments

Returns the Comments Collection. Read-only.

[ API set: 1.1 ]

height

Returns the height of the page. Read-only.

[ API set: 1.1 ]

index

Index of the Page. Read-only.

[ API set: 1.1 ]

isBackground

Whether the page is a background page or not. Read-only.

[ API set: 1.1 ]

name

Page name. Read-only.

[ API set: 1.1 ]

shapes

All top-level shapes in the Page.Read-only.

[ API set: 1.1 ]

view

Returns the view of the page. Read-only.

[ API set: 1.1 ]

width

Returns the width of the page. Read-only.

[ API set: 1.1 ]

Methods

activate()

Set the page as Active Page of the document.

[ API set: 1.1 ]

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

load(propertyNames)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

set(properties, options)

Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type.

set(properties)

Sets multiple properties on the object at the same time, based on an existing loaded object.

toJSON()

Property Details

allShapes

All shapes in the Page, including subshapes. Read-only.

[ API set: 1.1 ]

readonly allShapes: Visio.ShapeCollection;

Property Value

Visio.ShapeCollection

comments

Returns the Comments Collection. Read-only.

[ API set: 1.1 ]

readonly comments: Visio.CommentCollection;

Property Value

Visio.CommentCollection

height

Returns the height of the page. Read-only.

[ API set: 1.1 ]

readonly height: number;

Property Value

number

index

Index of the Page. Read-only.

[ API set: 1.1 ]

readonly index: number;

Property Value

number

isBackground

Whether the page is a background page or not. Read-only.

[ API set: 1.1 ]

readonly isBackground: boolean;

Property Value

boolean

name

Page name. Read-only.

[ API set: 1.1 ]

readonly name: string;

Property Value

string

shapes

All top-level shapes in the Page.Read-only.

[ API set: 1.1 ]

readonly shapes: Visio.ShapeCollection;

Property Value

Visio.ShapeCollection

view

Returns the view of the page. Read-only.

[ API set: 1.1 ]

readonly view: Visio.PageView;

Property Value

width

Returns the width of the page. Read-only.

[ API set: 1.1 ]

readonly width: number;

Property Value

number

Method Details

activate()

Set the page as Active Page of the document.

[ API set: 1.1 ]

activate(): void;

Returns

void

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

load(option?: Visio.Interfaces.PageLoadOptions): Visio.Page;

Parameters

option
Visio.Interfaces.PageLoadOptions

Returns

Visio.Page

Remarks

In addition to this signature, this method has the following signatures:

load(option?: string | string[]): Visio.Page - Where option is a comma-delimited string or an array of strings that specify the properties to load.

load(option?: { select?: string; expand?: string; }): Visio.Page - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load.

load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Page - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items.

load(propertyNames)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNames?: string | string[]): Visio.Page;

Parameters

propertyNames
string | string[]

A comma-delimited string or an array of strings that specify the properties to load.

Returns

Visio.Page

load(propertyNamesAndPaths)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Visio.Page;

Parameters

propertyNamesAndPaths
{ select?: string; expand?: string; }

Where propertyNamesAndPaths.select is a comma-delimited string that specifies the properties to load, and propertyNamesAndPaths.expand is a comma-delimited string that specifies the navigation properties to load.

Returns

Visio.Page

set(properties, options)

Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type.

set(properties: Interfaces.PageUpdateData, options?: OfficeExtension.UpdateOptions): void;

Parameters

properties
Interfaces.PageUpdateData

A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called.

options
OfficeExtension.UpdateOptions

Provides an option to suppress errors if the properties object tries to set any read-only properties.

Returns

void

Remarks

This method has the following additional signature:

set(properties: Visio.Page): void

set(properties)

Sets multiple properties on the object at the same time, based on an existing loaded object.

set(properties: Visio.Page): void;

Parameters

properties
Visio.Page

Returns

void

toJSON()

toJSON(): Visio.Interfaces.PageData;

Returns

Visio.Interfaces.PageData