OfficeIMO

API Reference

Class

VisioPage

Namespace OfficeIMO.Visio
Assembly OfficeIMO.Visio

Represents a single page within a Visio document.

Inheritance

  • Object
  • VisioPage

Constructors

VisioPage 2 overloads
public VisioPage(String name) #

Initializes a new instance of the VisioPage class with default A4 size.

Parameters

name System.String requiredposition: 0
Name of the page.
public VisioPage(String name, Double widthInches, Double heightInches) #

Initializes a new instance of the VisioPage class.

Parameters

name System.String requiredposition: 0
Name of the page.
widthInches System.Double requiredposition: 1
Page width in inches.
heightInches System.Double requiredposition: 2
Page height in inches.

Methods

AddCircle 2 overloads
public VisioShape AddCircle(Double x, Double y, Double diameter, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a circle shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
diameter System.Double requiredposition: 2
Diameter of the circle.
text System.String = null optionalposition: 3
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 4
Measurement unit.

Returns

The created circle shape.

public VisioShape AddCircle(Double x, Double y, Double diameter, String text = null) #
Returns: VisioShape

Adds a circle using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
diameter System.Double requiredposition: 2
Diameter of the circle.
text System.String = null optionalposition: 3
Optional text.

Returns

The created circle shape.

AddConnector 2 overloads
public VisioConnector AddConnector(VisioShape from, VisioShape to, ConnectorKind kind = Dynamic, VisioSide fromSide = Auto, VisioSide toSide = Auto) #
Returns: VisioConnector

Adds a connector between two shapes, optionally specifying side connection points.

Parameters

from OfficeIMO.Visio.VisioShape requiredposition: 0
Source shape.
to OfficeIMO.Visio.VisioShape requiredposition: 1
Target shape.
kind OfficeIMO.Visio.ConnectorKind = Dynamic optionalposition: 2
Connector kind (straight, curved, etc.).
fromSide OfficeIMO.Visio.VisioSide = Auto optionalposition: 3
Preferred side on the source shape.
toSide OfficeIMO.Visio.VisioSide = Auto optionalposition: 4
Preferred side on the target shape.

Returns

The created connector.

public VisioConnector AddConnector(String id, VisioShape from, VisioShape to, ConnectorKind kind) #
Returns: VisioConnector

Adds a connector between two shapes.

Parameters

id System.String requiredposition: 0
Identifier of the connector.
from OfficeIMO.Visio.VisioShape requiredposition: 1
Shape from which the connector starts.
to OfficeIMO.Visio.VisioShape requiredposition: 2
Shape to which the connector ends.
kind OfficeIMO.Visio.ConnectorKind requiredposition: 3
Type of connector.

Returns

The created connector.

AddData 2 overloads
public VisioShape AddData(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a flowchart data shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the data shape.
height System.Double requiredposition: 3
Height of the data shape.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created data shape.

public VisioShape AddData(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a flowchart data shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddDecision 2 overloads
public VisioShape AddDecision(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a flowchart decision shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the decision shape.
height System.Double requiredposition: 3
Height of the decision shape.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created decision shape.

public VisioShape AddDecision(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a flowchart decision shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddDiamond 2 overloads
public VisioShape AddDiamond(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a diamond shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the diamond.
height System.Double requiredposition: 3
Height of the diamond.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created diamond shape.

public VisioShape AddDiamond(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a diamond using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the diamond.
height System.Double requiredposition: 3
Height of the diamond.
text System.String = null optionalposition: 4
Optional text.

Returns

The created diamond shape.

AddEllipse 2 overloads
public VisioShape AddEllipse(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds an ellipse shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the ellipse.
height System.Double requiredposition: 3
Height of the ellipse.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created ellipse shape.

public VisioShape AddEllipse(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds an ellipse using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the ellipse.
height System.Double requiredposition: 3
Height of the ellipse.
text System.String = null optionalposition: 4
Optional text.

Returns

The created ellipse shape.

AddHexagon 2 overloads
public VisioShape AddHexagon(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a hexagon shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the hexagon.
height System.Double requiredposition: 3
Height of the hexagon.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created hexagon shape.

public VisioShape AddHexagon(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a hexagon shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddManualOperation 2 overloads
public VisioShape AddManualOperation(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a flowchart manual operation shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the manual operation shape.
height System.Double requiredposition: 3
Height of the manual operation shape.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created manual operation shape.

public VisioShape AddManualOperation(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a flowchart manual operation shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddOffPageReference 2 overloads
public VisioShape AddOffPageReference(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a flowchart off-page reference shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the off-page reference shape.
height System.Double requiredposition: 3
Height of the off-page reference shape.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created off-page reference shape.

public VisioShape AddOffPageReference(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a flowchart off-page reference shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddParallelogram 2 overloads
public VisioShape AddParallelogram(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a parallelogram shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the parallelogram.
height System.Double requiredposition: 3
Height of the parallelogram.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created parallelogram shape.

public VisioShape AddParallelogram(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a parallelogram shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddPentagon 2 overloads
public VisioShape AddPentagon(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a pentagon shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the pentagon.
height System.Double requiredposition: 3
Height of the pentagon.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created pentagon shape.

public VisioShape AddPentagon(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a pentagon shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddPreparation 2 overloads
public VisioShape AddPreparation(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a flowchart preparation shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the preparation shape.
height System.Double requiredposition: 3
Height of the preparation shape.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created preparation shape.

public VisioShape AddPreparation(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a flowchart preparation shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddProcess 2 overloads
public VisioShape AddProcess(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a flowchart process shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the process box.
height System.Double requiredposition: 3
Height of the process box.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created process shape.

public VisioShape AddProcess(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a flowchart process shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddRectangle 2 overloads
public VisioShape AddRectangle(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a rectangle shape.

Parameters

x System.Double requiredposition: 0
X coordinate of the shape origin.
y System.Double requiredposition: 1
Y coordinate of the shape origin.
width System.Double requiredposition: 2
Width of the rectangle.
height System.Double requiredposition: 3
Height of the rectangle.
text System.String = null optionalposition: 4
Optional text placed on the shape.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit for the provided values.

Returns

The created rectangle shape.

public VisioShape AddRectangle(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a rectangle shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the rectangle.
height System.Double requiredposition: 3
Height of the rectangle.
text System.String = null optionalposition: 4
Optional text.

Returns

The created rectangle shape.

AddShape 3 overloads
public VisioShape AddShape(String id, String masterNameU, Double x, Double y, Double w, Double h, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a shape to the page.

Parameters

id System.String requiredposition: 0
Identifier of the shape.
master OfficeIMO.Visio.VisioMaster requiredposition: 1
Master associated with the shape.
x System.Double requiredposition: 2
X coordinate.
y System.Double requiredposition: 3
Y coordinate.
w System.Double requiredposition: 4
Width of the shape.
h System.Double requiredposition: 5
Height of the shape.
text System.String = null optionalposition: 6
Optional text.
unit System.Nullable{OfficeIMO.Visio.VisioMeasurementUnit} = Inches optionalposition: 7
Optional measurement unit. When omitted, values are interpreted using the page DefaultUnit.

Returns

The created shape.

AddShape(System.String id, System.String masterNameU, System.Double x, System.Double y, System.Double w, System.Double h, System.String text, OfficeIMO.Visio.VisioMeasurementUnit unit) #

Adds a shape using a document-registered master by its NameU.

Parameters

id System.String required
Identifier of the shape.
masterNameU System.String required
Registered master universal name.
x System.Double required
X coordinate.
y System.Double required
Y coordinate.
w System.Double required
Width.
h System.Double required
Height.
text System.String required
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit required
Measurement unit for the provided values.

Returns

The created shape.

public VisioShape AddShape(String id, String masterNameU, Double x, Double y, Double w, Double h, String text = null) #
Returns: VisioShape

Adds a shape using the page DefaultUnit and a document-registered master.

Parameters

id System.String requiredposition: 0
masterNameU System.String requiredposition: 1
x System.Double requiredposition: 2
y System.Double requiredposition: 3
w System.Double requiredposition: 4
h System.Double requiredposition: 5
text System.String = null optionalposition: 6
AddSquare 2 overloads
public VisioShape AddSquare(Double x, Double y, Double size, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a square shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
size System.Double requiredposition: 2
Width and height of the square.
text System.String = null optionalposition: 3
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 4
Measurement unit.

Returns

The created square shape.

public VisioShape AddSquare(Double x, Double y, Double size, String text = null) #
Returns: VisioShape

Adds a square using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
size System.Double requiredposition: 2
Width and height of the square.
text System.String = null optionalposition: 3
Optional text.

Returns

The created square shape.

AddTrapezoid 2 overloads
public VisioShape AddTrapezoid(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a trapezoid shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the trapezoid.
height System.Double requiredposition: 3
Height of the trapezoid.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created trapezoid shape.

public VisioShape AddTrapezoid(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a trapezoid shape using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
text System.String = null optionalposition: 4
AddTriangle 2 overloads
public VisioShape AddTriangle(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #
Returns: VisioShape

Adds a triangle shape.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the triangle's bounding box.
height System.Double requiredposition: 3
Height of the triangle's bounding box.
text System.String = null optionalposition: 4
Optional text.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 5
Measurement unit.

Returns

The created triangle shape.

public VisioShape AddTriangle(Double x, Double y, Double width, Double height, String text = null) #
Returns: VisioShape

Adds a triangle using the page DefaultUnit.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.
width System.Double requiredposition: 2
Width of the triangle's bounding box.
height System.Double requiredposition: 3
Height of the triangle's bounding box.
text System.String = null optionalposition: 4
Optional text.

Returns

The created triangle shape.

public VisioPage Grid(Boolean visible, Boolean snap) #
Returns: VisioPage

Configures grid visibility and snapping.

Parameters

visible System.Boolean requiredposition: 0
Whether the grid is visible.
snap System.Boolean requiredposition: 1
Whether snapping is enabled.

Returns

The current page.

public Void ResetDrawingScale() #
Returns: Void

Removes any custom drawing scale override and reverts to ScaleMeasurementUnit.

public Void ResetPageScale() #
Returns: Void

Removes any custom page scale override and reverts to ScaleMeasurementUnit.

public VisioPage Size(Double w, Double h, VisioMeasurementUnit unit = Inches) #
Returns: VisioPage

Sets the page size.

Parameters

w System.Double requiredposition: 0
Width of the page.
h System.Double requiredposition: 1
Height of the page.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optionalposition: 2
Measurement unit.

Returns

The current page.

Properties

public Int32 Id { get; set; } #

Gets the identifier of the page within the document.

public String Name { get; } #

Gets the page name.

public String NameU { get; set; } #

Gets or sets the universal name of the page.

public Double ViewScale { get; set; } #

Gets or sets the view scale of the page.

public Double ViewCenterX { get; set; } #

Gets or sets the horizontal center of the view.

public Double ViewCenterY { get; set; } #

Gets or sets the vertical center of the view.

public Double Width { get; set; } #

Gets or sets the page width in inches.

public Double WidthCentimeters { get; set; } #

Gets or sets the page width in centimeters.

public Double Height { get; set; } #

Gets or sets the page height in inches.

public Double HeightCentimeters { get; set; } #

Gets or sets the page height in centimeters.

public VisioMeasurementUnit DefaultUnit { get; set; } #

Default measurement unit for positions and sizes on this page. New shape-adding overloads use this unit implicitly.

public VisioMeasurementUnit ScaleMeasurementUnit { get; set; } #

Measurement unit used to compute page and drawing scales when explicit overrides are not supplied. Defaults to inches and typically mirrors DefaultUnit.

public VisioScaleSetting PageScale { get; set; } #

Gets or sets the page scale (the ratio between page units and real-world units).

public VisioScaleSetting DrawingScale { get; set; } #

Gets or sets the drawing scale (the ratio between drawing units and real-world units).

public Double PageWidth { get; set; } #
Obsolete("Use Width instead")

Gets or sets the page width. Use Width instead.

public Double PageHeight { get; set; } #
Obsolete("Use Height instead")

Gets or sets the page height. Use Height instead.

public Boolean GridVisible { get; set; } #

Gets or sets a value indicating whether the grid is visible.

public Boolean Snap { get; set; } #

Gets or sets a value indicating whether snapping to grid is enabled.

public IList<VisioShape> Shapes { get; } #

Shapes placed on the page.

public IList<VisioConnector> Connectors { get; } #

Connectors placed on the page.