API Reference
VisioPage
Represents a single page within a Visio document.
Inheritance
- Object
- VisioPage
Constructors
public VisioPage(String name) #Initializes a new instance of the VisioPage class with default A4 size.
Parameters
- name System.String
- Name of the page.
Methods
public VisioShape AddCircle(Double x, Double y, Double diameter, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a circle shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- diameter System.Double
- Diameter of the circle.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created circle shape.
public VisioShape AddCircle(Double x, Double y, Double diameter, String text = null) #VisioShapeAdds a circle using the page DefaultUnit.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- diameter System.Double
- Diameter of the circle.
- text System.String = null
- Optional text.
Returns
The created circle shape.
public VisioConnector AddConnector(VisioShape from, VisioShape to, ConnectorKind kind = Dynamic, VisioSide fromSide = Auto, VisioSide toSide = Auto) #VisioConnectorAdds a connector between two shapes, optionally specifying side connection points.
Parameters
- from OfficeIMO.Visio.VisioShape
- Source shape.
- to OfficeIMO.Visio.VisioShape
- Target shape.
- kind OfficeIMO.Visio.ConnectorKind = Dynamic
- Connector kind (straight, curved, etc.).
- fromSide OfficeIMO.Visio.VisioSide = Auto
- Preferred side on the source shape.
- toSide OfficeIMO.Visio.VisioSide = Auto
- Preferred side on the target shape.
Returns
The created connector.
public VisioConnector AddConnector(String id, VisioShape from, VisioShape to, ConnectorKind kind) #VisioConnectorAdds a connector between two shapes.
Parameters
- id System.String
- Identifier of the connector.
- from OfficeIMO.Visio.VisioShape
- Shape from which the connector starts.
- to OfficeIMO.Visio.VisioShape
- Shape to which the connector ends.
- kind OfficeIMO.Visio.ConnectorKind
- Type of connector.
Returns
The created connector.
public VisioShape AddData(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a flowchart data shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the data shape.
- height System.Double
- Height of the data shape.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created data shape.
public VisioShape AddData(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a flowchart data shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddDecision(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a flowchart decision shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the decision shape.
- height System.Double
- Height of the decision shape.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created decision shape.
public VisioShape AddDecision(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a flowchart decision shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddDiamond(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a diamond shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the diamond.
- height System.Double
- Height of the diamond.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created diamond shape.
public VisioShape AddDiamond(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a diamond using the page DefaultUnit.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the diamond.
- height System.Double
- Height of the diamond.
- text System.String = null
- Optional text.
Returns
The created diamond shape.
public VisioShape AddEllipse(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds an ellipse shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the ellipse.
- height System.Double
- Height of the ellipse.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created ellipse shape.
public VisioShape AddEllipse(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds an ellipse using the page DefaultUnit.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the ellipse.
- height System.Double
- Height of the ellipse.
- text System.String = null
- Optional text.
Returns
The created ellipse shape.
public VisioShape AddHexagon(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a hexagon shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the hexagon.
- height System.Double
- Height of the hexagon.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created hexagon shape.
public VisioShape AddHexagon(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a hexagon shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddManualOperation(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a flowchart manual operation shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the manual operation shape.
- height System.Double
- Height of the manual operation shape.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created manual operation shape.
public VisioShape AddManualOperation(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a flowchart manual operation shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddOffPageReference(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a flowchart off-page reference shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the off-page reference shape.
- height System.Double
- Height of the off-page reference shape.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created off-page reference shape.
public VisioShape AddOffPageReference(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a flowchart off-page reference shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddParallelogram(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a parallelogram shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the parallelogram.
- height System.Double
- Height of the parallelogram.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created parallelogram shape.
public VisioShape AddParallelogram(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a parallelogram shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddPentagon(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a pentagon shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the pentagon.
- height System.Double
- Height of the pentagon.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created pentagon shape.
public VisioShape AddPentagon(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a pentagon shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddPreparation(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a flowchart preparation shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the preparation shape.
- height System.Double
- Height of the preparation shape.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created preparation shape.
public VisioShape AddPreparation(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a flowchart preparation shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddProcess(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a flowchart process shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the process box.
- height System.Double
- Height of the process box.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created process shape.
public VisioShape AddProcess(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a flowchart process shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddRectangle(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a rectangle shape.
Parameters
- x System.Double
- X coordinate of the shape origin.
- y System.Double
- Y coordinate of the shape origin.
- width System.Double
- Width of the rectangle.
- height System.Double
- Height of the rectangle.
- text System.String = null
- Optional text placed on the shape.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- 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) #VisioShapeAdds a rectangle shape using the page DefaultUnit.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the rectangle.
- height System.Double
- Height of the rectangle.
- text System.String = null
- Optional text.
Returns
The created rectangle shape.
public VisioShape AddShape(String id, String masterNameU, Double x, Double y, Double w, Double h, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a shape to the page.
Parameters
- id System.String
- Identifier of the shape.
- master OfficeIMO.Visio.VisioMaster
- Master associated with the shape.
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- w System.Double
- Width of the shape.
- h System.Double
- Height of the shape.
- text System.String = null
- Optional text.
- unit System.Nullable{OfficeIMO.Visio.VisioMeasurementUnit} = Inches
- 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
- Identifier of the shape.
- masterNameU System.String
- Registered master universal name.
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- w System.Double
- Width.
- h System.Double
- Height.
- text System.String
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit
- 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) #VisioShapeAdds a shape using the page DefaultUnit and a document-registered master.
Parameters
- id System.String
- masterNameU System.String
- x System.Double
- y System.Double
- w System.Double
- h System.Double
- text System.String = null
public VisioShape AddSquare(Double x, Double y, Double size, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a square shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- size System.Double
- Width and height of the square.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created square shape.
public VisioShape AddSquare(Double x, Double y, Double size, String text = null) #VisioShapeAdds a square using the page DefaultUnit.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- size System.Double
- Width and height of the square.
- text System.String = null
- Optional text.
Returns
The created square shape.
public VisioShape AddTrapezoid(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a trapezoid shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the trapezoid.
- height System.Double
- Height of the trapezoid.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created trapezoid shape.
public VisioShape AddTrapezoid(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a trapezoid shape using the page DefaultUnit.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- text System.String = null
public VisioShape AddTriangle(Double x, Double y, Double width, Double height, String text = null, VisioMeasurementUnit unit = Inches) #VisioShapeAdds a triangle shape.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the triangle's bounding box.
- height System.Double
- Height of the triangle's bounding box.
- text System.String = null
- Optional text.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The created triangle shape.
public VisioShape AddTriangle(Double x, Double y, Double width, Double height, String text = null) #VisioShapeAdds a triangle using the page DefaultUnit.
Parameters
- x System.Double
- X coordinate.
- y System.Double
- Y coordinate.
- width System.Double
- Width of the triangle's bounding box.
- height System.Double
- Height of the triangle's bounding box.
- text System.String = null
- Optional text.
Returns
The created triangle shape.
public VisioPage Grid(Boolean visible, Boolean snap) #VisioPageConfigures grid visibility and snapping.
Parameters
- visible System.Boolean
- Whether the grid is visible.
- snap System.Boolean
- Whether snapping is enabled.
Returns
The current page.
public Void ResetDrawingScale() #VoidRemoves any custom drawing scale override and reverts to ScaleMeasurementUnit.
public Void ResetPageScale() #VoidRemoves any custom page scale override and reverts to ScaleMeasurementUnit.
public VisioPage Size(Double w, Double h, VisioMeasurementUnit unit = Inches) #VisioPageSets the page size.
Parameters
- w System.Double
- Width of the page.
- h System.Double
- Height of the page.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit.
Returns
The current page.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public Int32 Id { get; set; } #Gets the identifier of the page within the document.
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.