Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

VisioPage

OfficeIMO.Visio

Namespace
OfficeIMO.Visio
Assembly
OfficeIMO.Visio
Source revision
0eef6a5756b9 with working tree changes

Represents a single page within a Visio document.

Inheritance

  • object
  • VisioPage

Usage

Explore 355 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 106

Accepted by parameters 249

Constructors

VisioPage 2 overloads
public VisioPage(string name) #

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

Parameters

name string required
Name of the page.
public VisioPage(string name, OfficeLength width, OfficeLength height) #

Creates geometry from explicit physical lengths.

Parameters

name string required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required

Methods

AddCircle 2 overloads
public VisioShape AddCircle(OfficeLength x, OfficeLength y, OfficeLength diameter, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
diameter OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddCircle(string id, OfficeLength x, OfficeLength y, OfficeLength diameter, string? text = null) #

Adds a circle with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
diameter OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddConnector 4 overloads
public VisioConnector AddConnector(string fromId, string toId, ConnectorKind kind = Dynamic, VisioSide fromSide = Auto, VisioSide toSide = Auto, Action<VisioConnector>? configure = null) #

Connects existing shapes selected by their identifiers.

Parameters

fromId string required
toId string required
kind OfficeIMO.Visio.ConnectorKind = Dynamic optional
fromSide OfficeIMO.Visio.VisioSide = Auto optional
toSide OfficeIMO.Visio.VisioSide = Auto optional
configure System.Action<OfficeIMO.Visio.VisioConnector>? = null optional
public VisioConnector AddConnector(string id, VisioShape from, VisioShape to, ConnectorKind kind, VisioSide fromSide = Auto, VisioSide toSide = Auto) #

Adds a connector between two shapes.

Parameters

id string required
Identifier of the connector.
from OfficeIMO.Visio.VisioShape required
Shape from which the connector starts.
to OfficeIMO.Visio.VisioShape required
Shape to which the connector ends.
kind OfficeIMO.Visio.ConnectorKind required
Type of connector.
fromSide OfficeIMO.Visio.VisioSide = Auto optional
Preferred side on the source shape.
toSide OfficeIMO.Visio.VisioSide = Auto optional
Preferred side on the target shape.

Returns

VisioConnector The created connector.
public VisioConnector AddConnector(string id, OfficePoint start, OfficePoint end, ConnectorKind kind = Straight, VisioMeasurementUnit? unit = null) #

Adds a connector between free page points using the page default unit unless a unit is supplied.

Parameters

id string required
start OfficeIMO.Drawing.OfficePoint required
end OfficeIMO.Drawing.OfficePoint required
kind OfficeIMO.Visio.ConnectorKind = Straight optional
unit OfficeIMO.Visio.VisioMeasurementUnit? = null optional
public VisioConnector AddConnector(VisioShape from, VisioShape to, ConnectorKind kind = Dynamic, VisioSide fromSide = Auto, VisioSide toSide = Auto) #

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

Parameters

from OfficeIMO.Visio.VisioShape required
Source shape.
to OfficeIMO.Visio.VisioShape required
Target shape.
kind OfficeIMO.Visio.ConnectorKind = Dynamic optional
Connector kind (straight, curved, etc.).
fromSide OfficeIMO.Visio.VisioSide = Auto optional
Preferred side on the source shape.
toSide OfficeIMO.Visio.VisioSide = Auto optional
Preferred side on the target shape.

Returns

VisioConnector The created connector.
AddContainer 4 overloads
public VisioShape AddContainer(string id, string text, IEnumerable<string> memberIds, VisioContainerOptions? options = null) #

Adds a container around existing shapes selected by identifier.

Parameters

id string required
text string required
memberIds System.Collections.Generic.IEnumerable<string> required
options OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public VisioShape AddContainer(string id, string text, IEnumerable<string> memberIds, Action<VisioContainerOptions> configure) #

Configures and adds a container around existing shapes selected by identifier.

Parameters

id string required
text string required
memberIds System.Collections.Generic.IEnumerable<string> required
configure System.Action<OfficeIMO.Visio.VisioContainerOptions> required

Returns

VisioShape
public VisioShape AddContainer(string id, string text, IEnumerable<VisioShape> members, VisioContainerOptions? options = null) #

Adds a Visio-native container shape around existing member shapes.

Parameters

id string required
Container shape identifier.
text string required
Container heading text.
members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
Shapes that should belong to the container.
options OfficeIMO.Visio.VisioContainerOptions? = null optional
Optional container layout and style settings.

Returns

VisioShape The created container shape.
public VisioShape AddContainer(string id, OfficeLength pinX, OfficeLength pinY, OfficeLength width, OfficeLength height, string? text = null, VisioContainerOptions? options = null) #

Applies physical lengths to the native Visio geometry.

Parameters

id string required
pinX OfficeIMO.OfficeLength required
pinY OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional
options OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
AddData 2 overloads
public VisioShape AddData(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddData(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a data with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddDecision 2 overloads
public VisioShape AddDecision(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddDecision(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a decision with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddDiamond 2 overloads
public VisioShape AddDiamond(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddDiamond(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a diamond with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddEllipse 2 overloads
public VisioShape AddEllipse(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddEllipse(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a ellipse with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddHexagon 2 overloads
public VisioShape AddHexagon(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddHexagon(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a hexagon with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioLayer AddLayer(string name, string? nameU = null) #

Adds a page layer, or returns the existing layer with the same name or universal name.

Parameters

name string required
Layer display name.
nameU string? = null optional
Optional universal name.

Returns

VisioLayer
AddManualOperation 2 overloads
public VisioShape AddManualOperation(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddManualOperation(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a manualoperation with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddOffPageReference 2 overloads
public VisioShape AddOffPageReference(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddOffPageReference(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a offpagereference with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddParallelogram 2 overloads
public VisioShape AddParallelogram(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddParallelogram(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a parallelogram with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddPentagon 2 overloads
public VisioShape AddPentagon(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddPentagon(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a pentagon with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddPreparation 2 overloads
public VisioShape AddPreparation(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddPreparation(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a preparation with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddProcess 2 overloads
public VisioShape AddProcess(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddProcess(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a process with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddRectangle 2 overloads
public VisioShape AddRectangle(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddRectangle(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a rectangle with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddShape 2 overloads
public VisioShape AddShape(string id, VisioMaster master, OfficeLength x, OfficeLength y, OfficeLength w, OfficeLength h, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

id string required
master OfficeIMO.Visio.VisioMaster required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
w OfficeIMO.OfficeLength required
h OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddShape(string id, string masterNameU, OfficeLength x, OfficeLength y, OfficeLength w, OfficeLength h, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

id string required
masterNameU string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
w OfficeIMO.OfficeLength required
h OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddSquare 2 overloads
public VisioShape AddSquare(OfficeLength x, OfficeLength y, OfficeLength size, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
size OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddSquare(string id, OfficeLength x, OfficeLength y, OfficeLength size, string? text = null) #

Adds a square with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
size OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddTextBox 2 overloads
public VisioShape AddTextBox(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null, Action<VisioShape>? configure = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional
configure System.Action<OfficeIMO.Visio.VisioShape>? = null optional

Returns

VisioShape
public VisioShape AddTextBox(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null, Action<VisioShape>? configure = null) #

Applies physical lengths to the native Visio geometry.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional
configure System.Action<OfficeIMO.Visio.VisioShape>? = null optional

Returns

VisioShape
public VisioShape AddTitle(string text, string id = "title", OfficeLength? height = null, OfficeLength? topMargin = null, Action<VisioShape>? configure = null) #

Adds a centered title near the top of the page with physical dimensions.

Parameters

text string required
id string = "title" optional
height OfficeIMO.OfficeLength? = null optional
topMargin OfficeIMO.OfficeLength? = null optional
configure System.Action<OfficeIMO.Visio.VisioShape>? = null optional

Returns

VisioShape
AddToContainer 2 overloads
public VisioPage AddToContainer(string containerId, IEnumerable<string> memberIds, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Adds existing shapes to a Visio-native container.

Parameters

containerId string required
memberIds System.Collections.Generic.IEnumerable<string> required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioPage
public VisioPage AddToContainer(string containerId, IEnumerable<string> memberIds, Action<VisioContainerOptions> configureResizeOptions) #

Adds existing shapes to a Visio-native container using inline resize option configuration.

Parameters

containerId string required
memberIds System.Collections.Generic.IEnumerable<string> required
configureResizeOptions System.Action<OfficeIMO.Visio.VisioContainerOptions> required

Returns

VisioPage
AddToLayer 2 overloads
public VisioPage AddToLayer(string layerName, VisioShape shape) #

Adds a shape to a page layer, creating the layer if needed.

Parameters

layerName string required
Layer name.
shape OfficeIMO.Visio.VisioShape required
Shape to assign.

Returns

VisioPage
public VisioPage AddToLayer(string layerName, VisioConnector connector) #

Adds a connector to a page layer, creating the layer if needed.

Parameters

layerName string required
Layer name.
connector OfficeIMO.Visio.VisioConnector required
Connector to assign.

Returns

VisioPage
AddTrapezoid 2 overloads
public VisioShape AddTrapezoid(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddTrapezoid(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a trapezoid with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddTriangle 2 overloads
public VisioShape AddTriangle(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Applies physical lengths to the native Visio geometry.

Parameters

x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public VisioShape AddTriangle(string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Adds a triangle with an explicit identifier and physical bounds.

Parameters

id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AlignShapes 2 overloads
public VisioPage AlignShapes(VisioHorizontalAlignment alignment, IEnumerable<string> shapeIds) #

Aligns existing shapes by id using the current selection bounds.

Parameters

alignment OfficeIMO.Visio.VisioHorizontalAlignment required
Horizontal alignment to apply.
shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to align.

Returns

VisioPage
public VisioPage AlignShapes(VisioVerticalAlignment alignment, IEnumerable<string> shapeIds) #

Aligns existing shapes by id using the current selection bounds.

Parameters

alignment OfficeIMO.Visio.VisioVerticalAlignment required
Vertical alignment to apply.
shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to align.

Returns

VisioPage
public VisioPage ApplyContainerOptions(string containerId, VisioContainerOptions options, bool refit = false) #

Applies native container metadata and visual style to an existing Visio-native container.

Parameters

containerId string required
options OfficeIMO.Visio.VisioContainerOptions required
refit bool = false optional

Returns

VisioPage
public VisioPage Callouts(Action<VisioShapeSelection> configure) #

Selects OfficeIMO callout or annotation shapes and configures them.

Parameters

configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
public VisioPage ClearBackgroundPage() #

Removes the applied background page reference.

Returns

VisioPage
public VisioPage ClearConnectorRoutingPolicy() #

Clears page-level connector routing and line-jump policy cells so Visio can use template defaults.

Returns

VisioPage
public VisioPage ClearConnectorSpacing() #

Clears page-level connector spacing cells so Visio can use template defaults.

Returns

VisioPage
public VisioPage ClearLayoutGridPolicy() #

Clears Visio layout grid enablement and sizing cells so Visio can use template defaults.

Returns

VisioPage
public VisioPage ClearLayoutGridSizing() #

Clears Visio layout grid sizing cells so Visio can use template defaults.

Returns

VisioPage
public VisioPage ClearPlacementPolicy() #

Clears page-level placement policy cells so Visio can use template defaults.

Returns

VisioPage
public VisioPage Configure(Action<VisioPage> configure) #

Configures this page and checks identifiers before and after the callback.

Parameters

configure System.Action<OfficeIMO.Visio.VisioPage> required

Returns

VisioPage
ConfigureConnectors 2 overloads
public VisioPage ConfigureConnectors(Action<VisioConnectorSelection> configure) #

Configures all connectors on the page.

Parameters

configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required
Configuration to apply to the selected connectors.

Returns

VisioPage
public VisioPage ConfigureConnectors(Func<VisioConnector, bool> predicate, Action<VisioConnectorSelection> configure) #

Selects connectors with a strongly typed predicate and configures the stable selection.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioConnector, bool> required
Predicate used to select connectors.
configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required
Configuration to apply to the selected connectors.

Returns

VisioPage
public VisioPage ConfigureContainer(string containerId, Action<VisioContainerOptions> configureOptions, bool refit = false) #

Updates native container metadata and visual style using a callback initialized from the current container state.

Parameters

containerId string required
configureOptions System.Action<OfficeIMO.Visio.VisioContainerOptions> required
refit bool = false optional

Returns

VisioPage
public VisioPage ConfigureContainers(Action<VisioShapeSelection> configure) #

Selects Visio-native container shapes and configures them.

Parameters

configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
ConfigureShapes 2 overloads
public VisioPage ConfigureShapes(Action<VisioShapeSelection> configure) #

Configures all shapes on the page, including grouped children.

Parameters

configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
Configuration to apply to the selected shapes.

Returns

VisioPage
public VisioPage ConfigureShapes(Func<VisioShape, bool> predicate, Action<VisioShapeSelection> configure) #

Selects shapes with a strongly typed predicate and configures the stable selection.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioShape, bool> required
Predicate used to select shapes.
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
Configuration to apply to the selected shapes.

Returns

VisioPage
public VisioPage ConnectedComponent(string shapeId, Action<VisioShapeSelection> configure, bool includeStart = true) #

Selects every shape reachable from the provided shape through connectors and configures them.

Parameters

shapeId string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
includeStart bool = true optional

Returns

VisioPage
public VisioPage ConnectedConnectors(string shapeId, Action<VisioConnectorSelection> configure) #

Selects connectors attached to the provided shape and configures them.

Parameters

shapeId string required
configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required

Returns

VisioPage
public VisioPage ConnectorsInLayer(string layerName, Action<VisioConnectorSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects connectors assigned to a page layer and configures them.

Parameters

layerName string required
configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
ConnectorsWithProtection 2 overloads
public VisioPage ConnectorsWithProtection(Action<VisioConnectorSelection> configure) #

Selects connectors with any explicit protection cell and configures them.

Parameters

configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required

Returns

VisioPage
public VisioPage ConnectorsWithProtection(Func<VisioProtection, bool> predicate, Action<VisioConnectorSelection> configure) #

Selects connectors whose protection state matches a predicate and configures them.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioProtection, bool> required
configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required

Returns

VisioPage
public VisioContainerInfo ContainerInfo(string containerId) #

Gets typed metadata and membership information for a Visio-native container.

Parameters

containerId string required
public VisioPage DistributeShapes(VisioDistributionAxis axis, IEnumerable<string> shapeIds) #

Distributes existing shapes by center point along the requested axis.

Parameters

axis OfficeIMO.Visio.VisioDistributionAxis required
Distribution axis.
shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to distribute.

Returns

VisioPage
DuplicateShape 2 overloads
public VisioPage DuplicateShape(string shapeId, Action<VisioShapeSelection>? configure = null) #

Duplicates one shape by id, copies its grouped children, and keeps copied ids easy to reference.

Parameters

shapeId string required
Identifier of the shape to duplicate.
configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null optional
Optional configuration for the duplicated selection.

Returns

VisioPage
public VisioPage DuplicateShape(string shapeId, VisioShapeDuplicationOptions? options, Action<VisioShapeSelection>? configure = null) #

Duplicates one shape by id using explicit duplication options.

Parameters

shapeId string required
Identifier of the shape to duplicate.
options OfficeIMO.Visio.VisioShapeDuplicationOptions? required
Duplication options.
configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null optional
Optional configuration for the duplicated selection.

Returns

VisioPage
DuplicateShapes 2 overloads
public VisioPage DuplicateShapes(IEnumerable<string> shapeIds, Action<VisioShapeSelection>? configure = null) #

Duplicates several shapes by id, preserving internal connectors between duplicated shapes.

Parameters

shapeIds System.Collections.Generic.IEnumerable<string> required
Shape identifiers to duplicate.
configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null optional
Optional configuration for the duplicated selection.

Returns

VisioPage
public VisioPage DuplicateShapes(IEnumerable<string> shapeIds, VisioShapeDuplicationOptions? options, Action<VisioShapeSelection>? configure = null) #

Duplicates several shapes by id using explicit duplication options.

Parameters

shapeIds System.Collections.Generic.IEnumerable<string> required
Shape identifiers to duplicate.
options OfficeIMO.Visio.VisioShapeDuplicationOptions? required
Duplication options.
configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null optional
Optional configuration for the duplicated selection.

Returns

VisioPage
public VisioLayer? FindLayer(string nameOrNameU) #

Finds a layer by display name or universal name.

Parameters

nameOrNameU string required
Layer name to find.

Returns

VisioLayer?
GetShape 2 overloads
public VisioShape GetShape(string id) #

Gets an existing shape by identifier, throwing when it is missing.

Parameters

id string required

Returns

VisioShape
public VisioShape GetShape(string id, Action<VisioShape> configure) #

Configures an existing shape selected by its current identifier.

Parameters

id string required
configure System.Action<OfficeIMO.Visio.VisioShape> required

Returns

VisioShape
public VisioPage Grid(bool visible, bool snap) #

Configures grid visibility and snapping.

Parameters

visible bool required
Whether the grid is visible.
snap bool required
Whether snapping is enabled.

Returns

VisioPage The current page.
public VisioPage IncomingConnectors(string shapeId, Action<VisioConnectorSelection> configure) #

Selects connectors that end at the provided shape and configures them.

Parameters

shapeId string required
configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required

Returns

VisioPage
public VisioPage MoveSwimlaneActivity(string activityId, string laneId, string phaseId, Action<VisioSwimlaneRelayoutOptions> configureOptions) #

Moves a swimlane activity to another lane/phase cell and relayouts swimlane activities.

Parameters

activityId string required
laneId string required
phaseId string required
configureOptions System.Action<OfficeIMO.Visio.VisioSwimlaneRelayoutOptions> required

Returns

VisioPage
public VisioPage OutgoingConnectors(string shapeId, Action<VisioConnectorSelection> configure) #

Selects connectors that start at the provided shape and configures them.

Parameters

shapeId string required
configure System.Action<OfficeIMO.Visio.VisioConnectorSelection> required

Returns

VisioPage
public VisioPage PathBetween(string fromId, string toId, Action<VisioShapeSelection> configure, bool includeEndpoints = true) #

Selects the shortest shape path between two connected shapes and configures it.

Parameters

fromId string required
toId string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
includeEndpoints bool = true optional

Returns

VisioPage
public void ReconnectConnector(VisioConnector connector, VisioShape newFrom, VisioShape newTo, VisioSide fromSide = Auto, VisioSide toSide = Auto) #

Reconnects both ends of an existing connector.

Parameters

connector OfficeIMO.Visio.VisioConnector required
newFrom OfficeIMO.Visio.VisioShape required
newTo OfficeIMO.Visio.VisioShape required
fromSide OfficeIMO.Visio.VisioSide = Auto optional
toSide OfficeIMO.Visio.VisioSide = Auto optional
public void ReconnectConnectorEnd(VisioConnector connector, VisioShape newTo, VisioSide side = Auto) #

Reconnects the end of an existing connector to a different shape.

Parameters

connector OfficeIMO.Visio.VisioConnector required
newTo OfficeIMO.Visio.VisioShape required
side OfficeIMO.Visio.VisioSide = Auto optional
public void ReconnectConnectorStart(VisioConnector connector, VisioShape newFrom, VisioSide side = Auto) #

Reconnects the start of an existing connector to a different shape.

Parameters

connector OfficeIMO.Visio.VisioConnector required
newFrom OfficeIMO.Visio.VisioShape required
side OfficeIMO.Visio.VisioSide = Auto optional
RefitContainer 2 overloads
public VisioPage RefitContainer(string containerId, VisioContainerOptions? options = null) #

Resizes a Visio-native container around its current members.

Parameters

containerId string required
options OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioPage
public VisioPage RefitContainer(string containerId, Action<VisioContainerOptions> configureOptions) #

Resizes a Visio-native container around its current members using inline option configuration.

Parameters

containerId string required
configureOptions System.Action<OfficeIMO.Visio.VisioContainerOptions> required

Returns

VisioPage
public VisioPage RelayoutConnectedComponentAsGrid(string shapeId, VisioSelectionLayoutOptions? options = null, bool includeStart = true) #

Relays out all shapes reachable from a starting shape through connectors.

Parameters

shapeId string required
Starting shape id.
options OfficeIMO.Visio.VisioSelectionLayoutOptions? = null optional
Optional layout settings.
includeStart bool = true optional
Whether the starting shape should be included in the relayout.

Returns

VisioPage
RelayoutContainerMembers 2 overloads
public VisioPage RelayoutContainerMembers(string containerId, VisioSelectionLayoutOptions? layoutOptions = null, bool refitContainer = true, VisioContainerOptions? refitOptions = null) #

Relays out the typed members of a Visio-native container and optionally refits the container around them.

Parameters

containerId string required
Container shape id.
layoutOptions OfficeIMO.Visio.VisioSelectionLayoutOptions? = null optional
Optional member layout settings.
refitContainer bool = true optional
Whether the container should be resized after member relayout.
refitOptions OfficeIMO.Visio.VisioContainerOptions? = null optional
Optional container refit settings.

Returns

VisioPage
public VisioPage RelayoutContainerMembers(string containerId, Action<VisioSelectionLayoutOptions> configureLayoutOptions, bool refitContainer = true, VisioContainerOptions? refitOptions = null) #

Relays out the typed members of a Visio-native container using inline layout option configuration.

Parameters

containerId string required
Container shape id.
configureLayoutOptions System.Action<OfficeIMO.Visio.VisioSelectionLayoutOptions> required
Layout option callback.
refitContainer bool = true optional
Whether the container should be resized after member relayout.
refitOptions OfficeIMO.Visio.VisioContainerOptions? = null optional
Optional container refit settings.

Returns

VisioPage
RelayoutShapesAsGrid 2 overloads
public VisioPage RelayoutShapesAsGrid(IEnumerable<string> shapeIds, VisioSelectionLayoutOptions? options = null) #

Relays out existing shapes by id into a deterministic grid and optionally reroutes internal connectors.

Parameters

shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to relayout.
options OfficeIMO.Visio.VisioSelectionLayoutOptions? = null optional
Optional layout settings.

Returns

VisioPage
public VisioPage RelayoutShapesAsGrid(IEnumerable<string> shapeIds, Action<VisioSelectionLayoutOptions> configureOptions) #

Relays out existing shapes by id into a deterministic grid using inline option configuration.

Parameters

shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to relayout.
configureOptions System.Action<OfficeIMO.Visio.VisioSelectionLayoutOptions> required
Option callback.

Returns

VisioPage
public VisioPage RelayoutShapesAsHorizontalStack(IEnumerable<string> shapeIds, double spacing = 0.5, bool routeInternalConnectors = true) #

Relays out existing shapes by id as a horizontal row and optionally reroutes internal connectors.

Parameters

shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to relayout.
spacing double = 0.5 optional
Horizontal spacing between shapes in inches.
routeInternalConnectors bool = true optional
Whether connectors whose endpoints are both selected should be rerouted orthogonally.

Returns

VisioPage
public VisioPage RelayoutShapesAsVerticalStack(IEnumerable<string> shapeIds, double spacing = 0.5, bool routeInternalConnectors = true) #

Relays out existing shapes by id as a vertical stack and optionally reroutes internal connectors.

Parameters

shapeIds System.Collections.Generic.IEnumerable<string> required
Shape ids to relayout.
spacing double = 0.5 optional
Vertical spacing between shapes in inches.
routeInternalConnectors bool = true optional
Whether connectors whose endpoints are both selected should be rerouted orthogonally.

Returns

VisioPage
RemoveFromContainer 2 overloads
public VisioPage RemoveFromContainer(string containerId, IEnumerable<string> memberIds, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Removes existing shapes from a Visio-native container.

Parameters

containerId string required
memberIds System.Collections.Generic.IEnumerable<string> required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioPage
public VisioPage RemoveFromContainer(string containerId, IEnumerable<string> memberIds, Action<VisioContainerOptions> configureResizeOptions) #

Removes existing shapes from a Visio-native container using inline resize option configuration.

Parameters

containerId string required
memberIds System.Collections.Generic.IEnumerable<string> required
configureResizeOptions System.Action<OfficeIMO.Visio.VisioContainerOptions> required

Returns

VisioPage
public void ReparentShape(VisioShape shape, VisioShape newParent, int childIndex = -1) #

Moves a shape from its current location in the page hierarchy into the provided group shape.

Parameters

shape OfficeIMO.Visio.VisioShape required
The shape to move.
newParent OfficeIMO.Visio.VisioShape required
The group that should own the shape after the move.
childIndex int = -1 optional
Optional insertion index within the target group's children. Use -1 to append.
ReplaceMaster 3 overloads
public VisioPage ReplaceMaster(string shapeId, string masterNameU, bool resizeToMaster = false) #

Replaces the master for a known shape id while preserving page placement, text, metadata, and connector endpoints.

Parameters

shapeId string required
masterNameU string required
resizeToMaster bool = false optional

Returns

VisioPage
public VisioPage ReplaceMaster(string shapeId, VisioMaster master, bool resizeToMaster = false) #

Replaces the master for a known shape id using an existing master instance.

Parameters

shapeId string required
master OfficeIMO.Visio.VisioMaster required
resizeToMaster bool = false optional

Returns

VisioPage
public VisioPage ReplaceMaster(string shapeId, VisioStencilShape stencil, bool resizeToMaster = false) #

Replaces the master for a known shape id using an OfficeIMO stencil definition.

Parameters

shapeId string required
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
resizeToMaster bool = false optional

Returns

VisioPage
ReplaceMasters 3 overloads
public VisioPage ReplaceMasters(Func<VisioShape, bool> predicate, string masterNameU, bool resizeToMaster = false) #

Replaces the master for every selected shape.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioShape, bool> required
masterNameU string required
resizeToMaster bool = false optional

Returns

VisioPage
public VisioPage ReplaceMasters(Func<VisioShape, bool> predicate, VisioMaster master, bool resizeToMaster = false) #

Replaces the master for every selected shape using an existing master instance.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioShape, bool> required
master OfficeIMO.Visio.VisioMaster required
resizeToMaster bool = false optional

Returns

VisioPage
public VisioPage ReplaceMasters(Func<VisioShape, bool> predicate, VisioStencilShape stencil, bool resizeToMaster = false) #

Replaces the master for every selected shape using an OfficeIMO stencil definition.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioShape, bool> required
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
resizeToMaster bool = false optional

Returns

VisioPage
ReplaceMastersByMaster 2 overloads
public VisioPage ReplaceMastersByMaster(string currentMasterNameU, string replacementMasterNameU, bool resizeToMaster = false, StringComparison comparison = OrdinalIgnoreCase) #

Replaces shapes using a matching current master universal name.

Parameters

currentMasterNameU string required
replacementMasterNameU string required
resizeToMaster bool = false optional
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public VisioPage ReplaceMastersByMaster(string currentMasterNameU, VisioStencilShape replacementStencil, bool resizeToMaster = false, StringComparison comparison = OrdinalIgnoreCase) #

Replaces shapes using a matching current master universal name and an OfficeIMO stencil definition.

Parameters

currentMasterNameU string required
replacementStencil OfficeIMO.Visio.Stencils.VisioStencilShape required
resizeToMaster bool = false optional
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public void ResetDrawingScale() #

Removes any custom drawing scale override and reverts to VisioPage.ScaleMeasurementUnit.

public void ResetPageScale() #

Removes any custom page scale override and reverts to VisioPage.ScaleMeasurementUnit.

public IReadOnlyList<VisioConnector> RetargetConnectors(VisioShape oldShape, VisioShape newShape, VisioConnectorEndpointScope endpointScope = Both, VisioSide fromSide = Auto, VisioSide toSide = Auto) #

Retargets all connector endpoints on this page that currently reference one shape to another.

Parameters

oldShape OfficeIMO.Visio.VisioShape required
The existing shape referenced by matching connectors.
newShape OfficeIMO.Visio.VisioShape required
The replacement shape that matching connectors should reference.
endpointScope OfficeIMO.Visio.VisioConnectorEndpointScope = Both optional
Controls whether start points, end points, or both are updated.
fromSide OfficeIMO.Visio.VisioSide = Auto optional
The side to glue to when a start point is updated.
toSide OfficeIMO.Visio.VisioSide = Auto optional
The side to glue to when an end point is updated.

Returns

IReadOnlyList<VisioConnector> The connectors that were updated.
public VisioPage SetAutoResizeDrawing(bool enabled = true) #

Enables or disables automatic page resizing to fit the diagram.

Parameters

enabled bool = true optional
Whether automatic drawing resize is enabled.

Returns

VisioPage
public VisioPage SetBackgroundPage(VisioPage backgroundPage) #

Applies a reusable Visio background page to this page.

Parameters

backgroundPage OfficeIMO.Visio.VisioPage required
Background page to apply.

Returns

VisioPage
public VisioPage SetConnectorRouteAppearance(VisioLineRouteExtension appearance) #

Sets the default appearance for routed connectors on this page.

Parameters

appearance OfficeIMO.Visio.VisioLineRouteExtension required
Default routed connector appearance.

Returns

VisioPage
public VisioPage SetConnectorRouteStyle(VisioPageRouteStyle style) #

Sets Visio's page-level connector routing style.

Parameters

style OfficeIMO.Visio.VisioPageRouteStyle required
Routing style to use for connectors without local routing.

Returns

VisioPage
SetConnectorSpacing 2 overloads
public VisioPage SetConnectorSpacing(double lineToLine, double lineToNode, VisioMeasurementUnit unit = Inches) #

Sets page-level connector and connector-to-shape spacing used by Visio routing.

Parameters

lineToLine double required
Horizontal and vertical connector-to-connector clearance.
lineToNode double required
Horizontal and vertical connector-to-shape clearance.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optional
Measurement unit for the provided values.

Returns

VisioPage
public VisioPage SetConnectorSpacing(double lineToLineX, double lineToLineY, double lineToNodeX, double lineToNodeY, VisioMeasurementUnit unit = Inches) #

Sets individual page-level connector routing clearances used by Visio.

Parameters

lineToLineX double required
Horizontal connector-to-connector clearance.
lineToLineY double required
Vertical connector-to-connector clearance.
lineToNodeX double required
Horizontal connector-to-shape clearance.
lineToNodeY double required
Vertical connector-to-shape clearance.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optional
Measurement unit for the provided values.

Returns

VisioPage
public VisioPage SetDrawingSize(VisioDrawingSizeType sizeType) #

Sets how Visio determines the drawing page size.

Parameters

sizeType OfficeIMO.Visio.VisioDrawingSizeType required
Drawing size behavior.

Returns

VisioPage
public VisioPage SetEnableLayoutGrid(bool enabled = true) #

Enables or disables Visio's internal layout grid for page layout.

Parameters

enabled bool = true optional
Whether Visio should use the internal layout grid.

Returns

VisioPage
SetLayoutGridSizing 2 overloads
public VisioPage SetLayoutGridSizing(double blockSize, double avenueSize, VisioMeasurementUnit unit = Inches) #

Sets Visio layout grid block sizes and spacing values.

Parameters

blockSize double required
Horizontal and vertical average shape block size.
avenueSize double required
Horizontal and vertical spacing between shapes.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optional
Measurement unit for the provided values.

Returns

VisioPage
public VisioPage SetLayoutGridSizing(double blockSizeX, double blockSizeY, double avenueSizeX, double avenueSizeY, VisioMeasurementUnit unit = Inches) #

Sets individual Visio layout grid block sizes and spacing values.

Parameters

blockSizeX double required
Horizontal average shape block size.
blockSizeY double required
Vertical average shape block size.
avenueSizeX double required
Horizontal spacing between shapes.
avenueSizeY double required
Vertical spacing between shapes.
unit OfficeIMO.Visio.VisioMeasurementUnit = Inches optional
Measurement unit for the provided values.

Returns

VisioPage
public VisioPage SetLineJumps(VisioLineJumpStyle style, VisioLineJumpCode code, VisioHorizontalLineJumpDirection horizontalDirection = Default, VisioVerticalLineJumpDirection verticalDirection = Default) #

Sets the default line jump behavior for this page.

Parameters

style OfficeIMO.Visio.VisioLineJumpStyle required
Line jump style.
code OfficeIMO.Visio.VisioLineJumpCode required
Which connectors receive line jumps.
horizontalDirection OfficeIMO.Visio.VisioHorizontalLineJumpDirection = Default optional
Default jump direction for horizontal dynamic connectors.
verticalDirection OfficeIMO.Visio.VisioVerticalLineJumpDirection = Default optional
Default jump direction for vertical dynamic connectors.

Returns

VisioPage
public VisioPage SetLockDuplicate(bool locked = true) #

Locks or unlocks page duplication.

Parameters

locked bool = true optional
Whether duplication is locked.

Returns

VisioPage
public VisioPage SetLockReplace(bool locked = true) #

Locks or unlocks page replacement.

Parameters

locked bool = true optional
Whether replacement is locked.

Returns

VisioPage
SetMargins 3 overloads
public VisioPage SetMargins(OfficeLength margin) #

Applies physical lengths to the native Visio geometry.

Parameters

margin OfficeIMO.OfficeLength required

Returns

VisioPage
public VisioPage SetMargins(OfficeLength horizontal, OfficeLength vertical) #

Applies physical lengths to the native Visio geometry.

Parameters

horizontal OfficeIMO.OfficeLength required
vertical OfficeIMO.OfficeLength required

Returns

VisioPage
public VisioPage SetMargins(OfficeLength left, OfficeLength right, OfficeLength top, OfficeLength bottom) #

Applies physical lengths to the native Visio geometry.

Parameters

left OfficeIMO.OfficeLength required
right OfficeIMO.OfficeLength required
top OfficeIMO.OfficeLength required
bottom OfficeIMO.OfficeLength required

Returns

VisioPage
public VisioPage SetMoveShapesAwayOnDrop(bool enabled = true) #

Enables or disables moving nearby shapes away on drop.

Parameters

enabled bool = true optional
Whether nearby placeable shapes move away on drop.

Returns

VisioPage
public VisioPage SetPlacementDepth(VisioPlacementDepth depth) #

Sets Visio's page-level placement analysis depth.

Parameters

depth OfficeIMO.Visio.VisioPlacementDepth required
Placement depth.

Returns

VisioPage
public VisioPage SetPlacementFlip(VisioPlacementFlip flip) #

Sets Visio's page-level placement flip behavior.

Parameters

flip OfficeIMO.Visio.VisioPlacementFlip required
Placement flip flags.

Returns

VisioPage
public VisioPage SetPlacementStyle(VisioPlacementStyle style) #

Sets Visio's page-level placement style.

Parameters

style OfficeIMO.Visio.VisioPlacementStyle required
Placement style.

Returns

VisioPage
public VisioPage SetPrintOrientation(VisioPagePrintOrientation orientation) #

Sets print orientation.

Parameters

orientation OfficeIMO.Visio.VisioPagePrintOrientation required
Print orientation.

Returns

VisioPage
public VisioPage SetResizePageToFitLayout(bool enabled = true) #

Enables or disables enlarging the page after Visio lays out shapes.

Parameters

enabled bool = true optional
Whether Visio should resize the page after layout.

Returns

VisioPage
public VisioPage SetShapeSplitting(bool enabled = true) #

Enables or disables automatic shape splitting on this page.

Parameters

enabled bool = true optional
Whether automatic shape splitting is enabled.

Returns

VisioPage
public VisioPage SetUiVisibility(VisioPageUiVisibility visibility) #

Shows or hides the page name in Visio UI page lists.

Parameters

visibility OfficeIMO.Visio.VisioPageUiVisibility required
Page UI visibility.

Returns

VisioPage
public VisioPage ShapesByMaster(string masterNameU, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes created from a matching master universal name and configures them.

Parameters

masterNameU string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public VisioPage ShapesByName(string name, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching shape name and configures them.

Parameters

name string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public VisioPage ShapesByNameU(string nameU, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching universal shape name and configures them.

Parameters

nameU string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
ShapesContainedIn 2 overloads
public VisioPage ShapesContainedIn(VisioShapeBounds bounds, Action<VisioShapeSelection> configure) #

Selects shapes fully contained by the provided page-coordinate bounds and configures them.

Parameters

bounds OfficeIMO.Visio.VisioShapeBounds required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
public VisioPage ShapesContainedIn(string containerId, Action<VisioShapeSelection> configure, bool includeContainer = false) #

Selects shapes fully contained by a reference shape and configures them.

Parameters

containerId string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
includeContainer bool = false optional

Returns

VisioPage
public VisioPage ShapesContainingText(string text, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes whose text contains the provided value and configures them.

Parameters

text string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public VisioPage ShapesInLayer(string layerName, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes in a page layer and configures them.

Parameters

layerName string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
ShapesIntersecting 2 overloads
public VisioPage ShapesIntersecting(VisioShapeBounds bounds, Action<VisioShapeSelection> configure) #

Selects shapes whose bounds intersect the provided page-coordinate bounds and configures them.

Parameters

bounds OfficeIMO.Visio.VisioShapeBounds required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
public VisioPage ShapesIntersecting(string shapeId, Action<VisioShapeSelection> configure, bool includeSelf = false) #

Selects shapes whose bounds intersect a reference shape and configures them.

Parameters

shapeId string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
includeSelf bool = false optional

Returns

VisioPage
ShapesWithData 2 overloads
public VisioPage ShapesWithData(string key, string value, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching Shape Data value and configures them.

Parameters

key string required
value string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public VisioPage ShapesWithData(string key, Func<string?, bool> predicate, Action<VisioShapeSelection> configure) #

Selects shapes whose Shape Data value matches a predicate and configures them.

Parameters

key string required
predicate System.Func<string?, bool> required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
ShapesWithProtection 2 overloads
public VisioPage ShapesWithProtection(Action<VisioShapeSelection> configure) #

Selects shapes with any explicit protection cell and configures them.

Parameters

configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
public VisioPage ShapesWithProtection(Func<VisioShapeProtection, bool> predicate, Action<VisioShapeSelection> configure) #

Selects shapes whose protection state matches a predicate and configures them.

Parameters

predicate System.Func<OfficeIMO.Visio.VisioShapeProtection, bool> required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
public VisioPage ShapesWithShapeData(string name, string value, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching typed Shape Data value and configures them.

Parameters

name string required
value string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
ShapesWithUserCell 2 overloads
public VisioPage ShapesWithUserCell(string name, Action<VisioShapeSelection> configure) #

Selects shapes that contain a Visio User cell and configures them.

Parameters

name string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required

Returns

VisioPage
public VisioPage ShapesWithUserCell(string name, string value, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching Visio User cell value and configures them.

Parameters

name string required
value string required
configure System.Action<OfficeIMO.Visio.VisioShapeSelection> required
comparison System.StringComparison = OrdinalIgnoreCase optional

Returns

VisioPage
public VisioPage Size(OfficeLength w, OfficeLength h) #

Applies physical lengths to the native Visio geometry.

Parameters

w OfficeIMO.OfficeLength required
h OfficeIMO.OfficeLength required

Returns

VisioPage
public VisioPage StyleContainer(string containerId, VisioShapeStyle style, bool refit = false) #

Applies a reusable visual style to an existing Visio-native container.

Parameters

containerId string required
style OfficeIMO.Visio.VisioShapeStyle required
refit bool = false optional

Returns

VisioPage
public IReadOnlyList<VisioShape> UngroupShape(VisioShape group) #

Removes a group shape and promotes its children into the group's former position.

Parameters

group OfficeIMO.Visio.VisioShape required
The group to ungroup.

Returns

IReadOnlyList<VisioShape> The children that were promoted.

Properties

public int Id { get; internal 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 VisioMeasurementUnit DefaultUnit { get; set; } #

Native measurement unit for drawing scale and imported ShapeSheet values. Public geometry uses explicit OfficeLength values.

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 VisioPage.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 bool GridVisible { get; set; } #

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

public bool Snap { get; set; } #

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

public bool PageLockReplace { get; set; } #

Gets or sets whether Visio should prevent replacing this page.

public bool PageLockDuplicate { get; set; } #

Gets or sets whether Visio should prevent duplicating this page.

public VisioDrawingSizeType DrawingSizeType { get; set; } #

Gets or sets how Visio determines this page's drawing size.

public bool AutoResizeDrawing { get; set; } #

Gets or sets whether Visio automatically resizes the drawing page to fit the diagram.

public bool AllowShapeSplitting { get; set; } #

Gets or sets whether Visio can automatically split shapes on this page.

public VisioPageUiVisibility UiVisibility { get; set; } #

Gets or sets whether the page name is shown in Visio UI surfaces such as page tabs.

public VisioPlacementStyle? PlacementStyle { get; set; } #

Gets or sets the page-level placement style Visio uses when laying out shapes.

public VisioPlacementDepth? PlacementDepth { get; set; } #

Gets or sets the placement analysis depth Visio uses during page layout.

public VisioPlacementFlip? PlacementFlip { get; set; } #

Gets or sets how Visio may flip or rotate shapes during page layout.

public bool? MoveShapesAwayOnDrop { get; set; } #

Gets or sets whether Visio should move nearby placeable shapes away when dropping a shape.

public bool? ResizePageToFitLayout { get; set; } #

Gets or sets whether Visio should enlarge the page after laying out shapes.

public bool? EnableLayoutGrid { get; set; } #

Gets or sets whether Visio uses its internal layout grid when arranging shapes on this page.

public VisioPageRouteStyle? ConnectorRouteStyle { get; set; } #

Gets or sets the page-level routing style for connectors without a local routing style.

public VisioLineRouteExtension? ConnectorRouteAppearance { get; set; } #

Gets or sets the default routed connector appearance on this page.

public VisioLineJumpStyle? LineJumpStyle { get; set; } #

Gets or sets the line jump style for connectors without a local jump style.

public VisioLineJumpCode? LineJumpCode { get; set; } #

Gets or sets which connectors receive line jumps on this page.

public VisioHorizontalLineJumpDirection? HorizontalLineJumpDirection { get; set; } #

Gets or sets the page default line jump direction for horizontal dynamic connectors.

public VisioVerticalLineJumpDirection? VerticalLineJumpDirection { get; set; } #

Gets or sets the page default line jump direction for vertical dynamic connectors.

public double? LineToLineX { get; } #

Gets the horizontal clearance between connectors in inches, if explicitly set.

public double? LineToLineY { get; } #

Gets the vertical clearance between connectors in inches, if explicitly set.

public double? LineToNodeX { get; } #

Gets the horizontal clearance between connectors and shapes in inches, if explicitly set.

public double? LineToNodeY { get; } #

Gets the vertical clearance between connectors and shapes in inches, if explicitly set.

public double? LayoutBlockSizeX { get; } #

Gets the horizontal average shape block size in inches, if explicitly set.

public double? LayoutBlockSizeY { get; } #

Gets the vertical average shape block size in inches, if explicitly set.

public double? LayoutAvenueSizeX { get; } #

Gets the horizontal spacing between shapes in inches, if explicitly set.

public double? LayoutAvenueSizeY { get; } #

Gets the vertical spacing between shapes in inches, if explicitly set.

public VisioPagePrintOrientation? PrintOrientation { get; set; } #

Gets or sets the print orientation. When null, OfficeIMO keeps Visio's default unless non-default page metadata is required.

public bool IsBackground { get; set; } #

Gets or sets whether this page is a Visio background page.

public VisioPage? BackgroundPage { get; private set; } #

Gets the background page applied to this foreground page, if any.

public IList<VisioShape> Shapes { get; } #

Shapes placed on the page.

public IList<VisioConnector> Connectors { get; } #

Connectors placed on the page.

public IList<VisioLayer> Layers { get; } #

Layers defined on this page.

public IList<VisioComment> Comments { get; } #

Native Visio comments attached to this page.

public OfficeLength Width { get; set; } #

Gets or sets the physical Width.

public OfficeLength Height { get; set; } #

Gets or sets the physical Height.

public OfficeLength LeftMargin { get; } #

Gets the physical LeftMargin.

public OfficeLength RightMargin { get; } #

Gets the physical RightMargin.

public OfficeLength TopMargin { get; } #

Gets the physical TopMargin.

public OfficeLength BottomMargin { get; } #

Gets the physical BottomMargin.

Extension Methods

AddCallout 4 overloads
public static VisioShape AddCallout(VisioPage page, VisioShape target, string text, OfficeLength pinX, OfficeLength pinY, VisioCalloutOptions? options = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
text string required
pinX OfficeIMO.OfficeLength required
pinY OfficeIMO.OfficeLength required
options OfficeIMO.Visio.VisioCalloutOptions? = null optional

Returns

VisioShape
public static VisioShape AddCallout(VisioPage page, VisioShape target, string text, VisioSide placement, OfficeLength? gap = null, VisioCalloutOptions? options = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
text string required
placement OfficeIMO.Visio.VisioSide required
gap OfficeIMO.OfficeLength? = null optional
options OfficeIMO.Visio.VisioCalloutOptions? = null optional

Returns

VisioShape
public static VisioShape AddCallout(VisioPage page, VisioShape target, string id, string text, OfficeLength pinX, OfficeLength pinY, VisioCalloutOptions? options = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
id string required
text string required
pinX OfficeIMO.OfficeLength required
pinY OfficeIMO.OfficeLength required
options OfficeIMO.Visio.VisioCalloutOptions? = null optional

Returns

VisioShape
public static VisioShape AddCallout(VisioPage page, VisioShape target, string id, string text, VisioSide placement, OfficeLength? gap = null, VisioCalloutOptions? options = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
id string required
text string required
placement OfficeIMO.Visio.VisioSide required
gap OfficeIMO.OfficeLength? = null optional
options OfficeIMO.Visio.VisioCalloutOptions? = null optional

Returns

VisioShape
AddComment 2 overloads
public static VisioComment AddComment(VisioPage page, string text, string? authorName = null, string? authorInitials = null, VisioCommentOptions? options = null) #

Adds a page-level native Visio comment.

Parameters

page OfficeIMO.Visio.VisioPage required
text string required
authorName string? = null optional
authorInitials string? = null optional
options OfficeIMO.Visio.VisioCommentOptions? = null optional
public static VisioComment AddComment(VisioPage page, VisioShape target, string text, string? authorName = null, string? authorInitials = null, VisioCommentOptions? options = null) #

Adds a native Visio comment to a shape on the page.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
text string required
authorName string? = null optional
authorInitials string? = null optional
options OfficeIMO.Visio.VisioCommentOptions? = null optional
public static VisioComment AddCommentToShape(VisioPage page, string shapeId, string text, string? authorName = null, string? authorInitials = null, VisioCommentOptions? options = null) #

Adds a native Visio comment to a shape or connector by identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
shapeId string required
text string required
authorName string? = null optional
authorInitials string? = null optional
options OfficeIMO.Visio.VisioCommentOptions? = null optional
public static VisioDataGraphicLegend AddDataGraphicLegend(VisioPage page, string id, string title, VisioDataGraphic definition, double pinX, double pinY, double width = 2.4) #

Adds a compact typed legend for a data-graphic definition.

Parameters

page OfficeIMO.Visio.VisioPage required
id string required
title string required
definition OfficeIMO.Visio.VisioDataGraphic required
pinX double required
pinY double required
width double = 2.4 optional
public static IReadOnlyList<VisioShape> AddDataGraphics(VisioPage page, VisioShape target, VisioDataGraphic dataGraphic) #

Adds visible data graphics for one target shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the target shape.
target OfficeIMO.Visio.VisioShape required
Shape whose Shape Data values should be visualized.
dataGraphic OfficeIMO.Visio.VisioDataGraphic required
Data graphic definition.

Returns

IReadOnlyList<VisioShape>
public static VisioShape AddNestedContainer(VisioPage page, VisioShape parent, VisioShape child, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Adds a container as a cycle-safe nested member.

Parameters

page OfficeIMO.Visio.VisioPage required
parent OfficeIMO.Visio.VisioShape required
child OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public static IReadOnlyList<VisioShape> AddStencilGallery(VisioPage page, VisioStencilCatalog catalog, VisioStencilGalleryOptions? options = null) #

Adds a contact-sheet gallery for a stencil catalog to the page.

Parameters

page OfficeIMO.Visio.VisioPage required
Target page.
catalog OfficeIMO.Visio.Stencils.VisioStencilCatalog required
Stencil catalog to render.
options OfficeIMO.Visio.Stencils.VisioStencilGalleryOptions? = null optional
Optional gallery layout and visual options.

Returns

IReadOnlyList<VisioShape> The stencil instance shapes placed in the gallery.
AddStencilShape 6 overloads
public static VisioShape AddStencilShape(VisioPage page, VisioStencilShape stencil, string id, OfficeLength x, OfficeLength y, string? text = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public static VisioShape AddStencilShape(VisioPage page, VisioStencilShape stencil, string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public static VisioShape AddStencilShape(VisioPage page, VisioStencilCatalog catalog, string stencilIdOrName, string id, OfficeLength x, OfficeLength y, string? text = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
catalog OfficeIMO.Visio.Stencils.VisioStencilCatalog required
stencilIdOrName string required
id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public static VisioShape AddStencilShape(VisioPage page, VisioStencilCatalog catalog, string stencilIdOrName, string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
catalog OfficeIMO.Visio.Stencils.VisioStencilCatalog required
stencilIdOrName string required
id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public static VisioShape AddStencilShape(VisioPage page, string stencilIdOrName, string id, OfficeLength x, OfficeLength y, string? text = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
stencilIdOrName string required
id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
public static VisioShape AddStencilShape(VisioPage page, string stencilIdOrName, string id, OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, string? text = null) #

Creates the shape using explicit physical coordinates and dimensions.

Parameters

page OfficeIMO.Visio.VisioPage required
stencilIdOrName string required
id string required
x OfficeIMO.OfficeLength required
y OfficeIMO.OfficeLength required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
text string? = null optional

Returns

VisioShape
AddToContainer 2 overloads
public static VisioShape AddToContainer(VisioPage page, VisioShape container, VisioShape member, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Adds one member shape to a Visio-native container and optionally resizes the container around all current members.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required
member OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public static VisioShape AddToContainer(VisioPage page, VisioShape container, IEnumerable<VisioShape> members, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Adds member shapes to a Visio-native container and optionally resizes the container around all current members.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required
members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public static IReadOnlyList<VisioShape> AllShapes(VisioPage page) #

Returns all shapes on the page, including shapes nested inside groups.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioDiagramQualityIssue> AnalyzeVisualQuality(VisioPage page, VisioDiagramQualityOptions? options = null) #

Analyzes a page for common visual quality issues.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to analyze.
options OfficeIMO.Visio.VisioDiagramQualityOptions? = null optional
Analysis options.

Returns

IReadOnlyList<VisioDiagramQualityIssue>
public static VisioShape ApplyContainerOptions(VisioPage page, VisioShape container, VisioContainerOptions options, bool refit = false) #

Applies native container metadata and visual style to an existing Visio-native container.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape to update.
options OfficeIMO.Visio.VisioContainerOptions required
Container metadata and style options.
refit bool = false optional
Whether the container should be refit around current members after metadata is applied.

Returns

VisioShape
ApplyStencilMigration 2 overloads
public static VisioStencilMigrationResult ApplyStencilMigration(VisioPage page, VisioStencilMigrationMap map) #

Applies a stencil migration map to all shapes on a page, including grouped children.

Parameters

page OfficeIMO.Visio.VisioPage required
map OfficeIMO.Visio.VisioStencilMigrationMap required
public static VisioStencilMigrationResult ApplyStencilMigration(VisioPage page, VisioStencilMigrationPlan plan, VisioStencilMigrationMap map) #

Applies a previously reviewed stencil migration plan to a page. The current page and shapes must still match the reviewed plan.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to update.
plan OfficeIMO.Visio.VisioStencilMigrationPlan required
Reviewed migration plan.
map OfficeIMO.Visio.VisioStencilMigrationMap required
Migration map used to create the plan.
public static VisioSwimlaneAssignmentResult AssignSwimlaneActivities(VisioPage page) #

Assigns native lane and phase metadata to discovered activities from their current geometry. Ambiguous or out-of-grid shapes are reported and left unchanged.

Parameters

page OfficeIMO.Visio.VisioPage required
public static IReadOnlyList<VisioShape> Callouts(VisioPage page) #

Returns shapes marked as OfficeIMO callouts or annotations.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.

Returns

IReadOnlyList<VisioShape>
public static VisioPage CenterContent(VisioPage page) #

Centers top-level page shapes within the current page size.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to update.

Returns

VisioPage
public static IReadOnlyList<VisioComment> CommentsByAuthor(VisioPage page, VisioCommentAuthor author) #

Returns comments written by one stable author identity.

Parameters

page OfficeIMO.Visio.VisioPage required
author OfficeIMO.Visio.VisioCommentAuthor required

Returns

IReadOnlyList<VisioComment>
CommentsForShape 2 overloads
public static IReadOnlyList<VisioComment> CommentsForShape(VisioPage page, VisioShape target) #

Returns comments that target the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required

Returns

IReadOnlyList<VisioComment>
public static IReadOnlyList<VisioComment> CommentsForShape(VisioPage page, string shapeId) #

Returns comments that target the provided shape or connector identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
shapeId string required

Returns

IReadOnlyList<VisioComment>
public static VisioShape ConfigureContainer(VisioPage page, VisioShape container, Action<VisioContainerOptions> configure, bool refit = false) #

Updates native container metadata and visual style using a callback initialized from the current container state.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape to update.
configure System.Action<OfficeIMO.Visio.VisioContainerOptions> required
Option callback.
refit bool = false optional
Whether the container should be refit around current members after metadata is applied.

Returns

VisioShape
public static IReadOnlyList<VisioShape> ConnectedComponent(VisioPage page, VisioShape shape, bool includeStart = true) #

Returns every shape reachable from the provided shape through connectors.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Starting shape.
includeStart bool = true optional
Whether the starting shape should be included in the returned component.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioConnector> ConnectedConnectors(VisioPage page, VisioShape shape) #

Returns connectors that either start or end at the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape connected to or from.

Returns

IReadOnlyList<VisioConnector>
public static IReadOnlyList<VisioShape> ConnectedShapes(VisioPage page, VisioShape shape) #

Returns shapes connected to the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape whose neighbors should be returned.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioConnector> ConnectorsInLayer(VisioPage page, string layerName, StringComparison comparison = OrdinalIgnoreCase) #

Returns connectors assigned to a page layer.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
layerName string required
Layer name or universal name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioConnector>
ConnectorsWithProtection 2 overloads
public static IReadOnlyList<VisioConnector> ConnectorsWithProtection(VisioPage page) #

Returns connectors that have at least one explicit protection cell.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.

Returns

IReadOnlyList<VisioConnector>
public static IReadOnlyList<VisioConnector> ConnectorsWithProtection(VisioPage page, Func<VisioProtection, bool> predicate) #

Returns connectors whose protection state matches the predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
predicate System.Func<OfficeIMO.Visio.VisioProtection, bool> required
Protection predicate.

Returns

IReadOnlyList<VisioConnector>
public static IReadOnlyList<VisioShape> Containers(VisioPage page) #

Returns shapes marked as Visio-native containers.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.

Returns

IReadOnlyList<VisioShape>
Duplicate 2 overloads
public static VisioPage Duplicate(VisioPage page, string? name = null) #

Duplicates this page in its owner document.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to duplicate.
name string? = null optional
Optional name for the duplicate. When omitted, a unique copy name is generated.

Returns

VisioPage The duplicated page.
public static VisioPage Duplicate(VisioPage page, VisioPageDuplicationOptions? options) #

Duplicates this page in its owner document.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to duplicate.
options OfficeIMO.Visio.VisioPageDuplicationOptions? required
Optional duplication settings.

Returns

VisioPage The duplicated page.
DuplicateShapes 2 overloads
public static VisioShapeSelection DuplicateShapes(VisioPage page, IEnumerable<VisioShape> shapes, double offsetX = 0.35, double offsetY = -0.35, bool includeInternalConnectors = true) #

Duplicates shapes on the same page and optionally copies connectors whose attached shapes are all duplicated; fully free connectors are excluded.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shapes.
shapes System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
Shapes to duplicate. Nested children are copied with their selected ancestor.
offsetX double = 0.35 optional
Horizontal offset for duplicated top-level shapes and page-coordinate routing points.
offsetY double = -0.35 optional
Vertical offset for duplicated top-level shapes and page-coordinate routing points.
includeInternalConnectors bool = true optional
Whether connectors whose attached shapes are all duplicated should also be copied, including partial connectors.

Returns

VisioShapeSelection A selection containing the duplicated root shapes.
public static VisioShapeSelection DuplicateShapes(VisioPage page, IEnumerable<VisioShape> shapes, VisioShapeDuplicationOptions? options) #

Duplicates shapes on the same page and optionally copies connectors whose attached shapes are all duplicated; fully free connectors are excluded.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shapes.
shapes System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
Shapes to duplicate. Nested children are copied with their selected ancestor.
options OfficeIMO.Visio.VisioShapeDuplicationOptions? required
Optional duplication settings.

Returns

VisioShapeSelection A selection containing the duplicated root shapes.
public static VisioPage EnsureVisualQuality(VisioPage page, VisioDiagramQualityOptions? options = null, VisioDiagramQualityIssueSeverity minimumSeverity = Warning) #

Throws when a page contains visual quality issues at or above the requested severity.

Parameters

page OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioDiagramQualityOptions? = null optional
minimumSeverity OfficeIMO.Visio.VisioDiagramQualityIssueSeverity = Warning optional

Returns

VisioPage
public static VisioComment? FindComment(VisioPage page, int commentId) #

Finds a native Visio comment by its page-scoped identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
commentId int required

Returns

VisioComment?
public static VisioShape? FindShapeById(VisioPage page, string id) #

Finds a shape by identifier, including shapes nested inside groups.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
id string required
Shape identifier.

Returns

VisioShape?
public static VisioSwimlaneLane? FindSwimlaneLane(VisioPage page, string laneId) #

Finds a swimlane lane by identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
laneId string required
public static VisioSwimlanePhase? FindSwimlanePhase(VisioPage page, string phaseId) #

Finds a swimlane phase by identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
phaseId string required
FitToContent 3 overloads
public static VisioPage FitToContent(VisioPage page, double margin = 0.5, bool resizePage = true) #

Moves top-level page shapes so content starts at the requested margin and optionally resizes the page to fit.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to update.
margin double = 0.5 optional
Margin in inches around content.
resizePage bool = true optional
Whether to resize the page around the content.

Returns

VisioPage
public static VisioPage FitToContent(VisioPage page, VisioFitToContentOptions options) #

Fits an imported page using explicit group-child, connector-route, translation, and resize policies. Rotation-aware shape bounds and connector label boxes are used.

Parameters

page OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioFitToContentOptions required

Returns

VisioPage
public static VisioPage FitToContent(VisioPage page, double horizontalMargin, double verticalMargin, bool resizePage = true) #

Moves top-level page shapes so content starts at the requested margins and optionally resizes the page to fit.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to update.
horizontalMargin double required
Horizontal margin in inches.
verticalMargin double required
Vertical margin in inches.
resizePage bool = true optional
Whether to resize the page around the content.

Returns

VisioPage
public static IReadOnlyList<VisioCommentThread> GetCommentThreads(VisioPage page) #

Returns deterministic root-and-reply thread projections.

Parameters

page OfficeIMO.Visio.VisioPage required

Returns

IReadOnlyList<VisioCommentThread>
public static VisioContainerInfo GetContainerInfo(VisioPage page, VisioShape container) #

Gets typed metadata and membership information for a Visio-native container.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape.
public static IReadOnlyList<VisioShape> GetContainerMembers(VisioPage page, VisioShape container) #

Gets the shapes currently referenced by a Visio-native container.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape.

Returns

IReadOnlyList<VisioShape>
public static VisioContainerOptions GetContainerOptions(VisioPage page, VisioShape container) #

Gets editable options initialized from a Visio-native container's current metadata and visual style.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape.
public static VisioShapeBounds GetContentBounds(VisioPage page, bool includeGroupChildren = false, bool includeConnectors = true) #

Gets bounds of visible page content, including shapes, explicit connector routes, and connector label boxes.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to inspect.
includeGroupChildren bool = false optional
Whether nested group children should be included using their stored coordinates.
includeConnectors bool = true optional
Whether connector waypoints and label boxes should be included.
public static VisioDataGraphicInstance GetDataGraphic(VisioPage page, VisioShape target) #

Returns generated data graphics currently attached to a target shape.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
public static IReadOnlyList<VisioShape> GetNestedContainers(VisioPage page, VisioShape container) #

Gets direct member containers.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> GetParentContainers(VisioPage page, VisioShape container) #

Gets containers that directly contain the supplied container.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioSwimlaneActivityPlacement> GetSwimlaneActivities(VisioPage page) #

Finds swimlane activities and their current lane/phase placement.

Parameters

page OfficeIMO.Visio.VisioPage required

Returns

IReadOnlyList<VisioSwimlaneActivityPlacement>
public static IReadOnlyList<VisioSwimlaneLane> GetSwimlaneLanes(VisioPage page) #

Finds swimlane lanes on the page, using OfficeIMO semantic metadata first and generated IDs/stencil metadata as a fallback.

Parameters

page OfficeIMO.Visio.VisioPage required

Returns

IReadOnlyList<VisioSwimlaneLane>
public static IReadOnlyList<VisioSwimlanePhase> GetSwimlanePhases(VisioPage page) #

Finds swimlane phase columns on the page, using OfficeIMO semantic metadata first and generated IDs/stencil metadata as a fallback.

Parameters

page OfficeIMO.Visio.VisioPage required

Returns

IReadOnlyList<VisioSwimlanePhase>
public static VisioDiagramQualityReport GetVisualQualityReport(VisioPage page, VisioDiagramQualityOptions? options = null) #

Creates a visual quality report for a page.

Parameters

page OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioDiagramQualityOptions? = null optional
public static IReadOnlyList<VisioConnector> IncomingConnectors(VisioPage page, VisioShape shape) #

Returns connectors that end at the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape connected to.

Returns

IReadOnlyList<VisioConnector>
public static VisioPage MoveSwimlaneActivity(VisioPage page, string activityId, string laneId, string phaseId, VisioSwimlaneRelayoutOptions? options = null) #

Moves a swimlane activity to a target lane/phase cell and relayouts the affected swimlane activities.

Parameters

page OfficeIMO.Visio.VisioPage required
activityId string required
laneId string required
phaseId string required
options OfficeIMO.Visio.VisioSwimlaneRelayoutOptions? = null optional

Returns

VisioPage
public static IReadOnlyList<VisioConnector> OutgoingConnectors(VisioPage page, VisioShape shape) #

Returns connectors that start at the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape connected from.

Returns

IReadOnlyList<VisioConnector>
public static IReadOnlyList<VisioShape> PathBetween(VisioPage page, VisioShape from, VisioShape to, bool includeEndpoints = true) #

Returns the shortest shape path between two connected shapes, or an empty list when no path exists.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
from OfficeIMO.Visio.VisioShape required
Starting shape.
to OfficeIMO.Visio.VisioShape required
Target shape.
includeEndpoints bool = true optional
Whether the starting and target shapes should be included.

Returns

IReadOnlyList<VisioShape>
public static VisioStencilMigrationPlan PlanStencilMigration(VisioPage page, VisioStencilMigrationMap map) #

Plans a stencil migration map for all shapes on a page, including grouped children, without modifying the page.

Parameters

page OfficeIMO.Visio.VisioPage required
map OfficeIMO.Visio.VisioStencilMigrationMap required
public static VisioPage PolishDiagram(VisioPage page, VisioDiagramPolishOptions? options = null) #

Applies a deterministic cleanup pass to a page: optional text fitting, connector label fitting, label collision cleanup, and page fitting.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to polish.
options OfficeIMO.Visio.VisioDiagramPolishOptions? = null optional
Optional polish settings.

Returns

VisioPage
public static VisioShape RefitContainer(VisioPage page, VisioShape container, VisioContainerOptions? options = null) #

Resizes a Visio-native container so it encloses its current typed members.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape to resize.
options OfficeIMO.Visio.VisioContainerOptions? = null optional
Optional margin and heading settings used for the calculated bounds.

Returns

VisioShape
public static IReadOnlyList<VisioShape> RefreshDataGraphics(VisioPage page, VisioShape target, VisioDataGraphic definition) #

Rebuilds one target's data graphics from current Shape Data values.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required
definition OfficeIMO.Visio.VisioDataGraphic required

Returns

IReadOnlyList<VisioShape>
public static VisioPage RelayoutDiagram(VisioPage page, VisioWholeDiagramRelayoutOptions? options = null) #

Relayouts eligible top-level shapes using connector topology. Cycles are kept together as strongly connected components while downstream nodes retain later layers; semantic surfaces remain fixed unless explicitly included.

Parameters

page OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioWholeDiagramRelayoutOptions? = null optional

Returns

VisioPage
public static VisioPage RelayoutSwimlaneActivities(VisioPage page, VisioSwimlaneRelayoutOptions? options = null) #

Re-centers swimlane activities inside their lane/phase cells, stacking multiple activities deterministically.

Parameters

page OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioSwimlaneRelayoutOptions? = null optional

Returns

VisioPage
RemoveComment 2 overloads
public static bool RemoveComment(VisioPage page, VisioComment comment) #

Removes a native Visio comment from the page.

Parameters

page OfficeIMO.Visio.VisioPage required
comment OfficeIMO.Visio.VisioComment required

Returns

bool
public static bool RemoveComment(VisioPage page, int commentId) #

Removes a native Visio comment by its page-scoped identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
commentId int required

Returns

bool
public static int RemoveCommentsForShape(VisioPage page, string shapeId) #

Removes all native Visio comments targeting a shape or connector identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
shapeId string required

Returns

int
public static int RemoveDataGraphics(VisioPage page, VisioShape target) #

Removes generated data-graphic shapes for one target.

Parameters

page OfficeIMO.Visio.VisioPage required
target OfficeIMO.Visio.VisioShape required

Returns

int
RemoveFromContainer 2 overloads
public static VisioShape RemoveFromContainer(VisioPage page, VisioShape container, VisioShape member, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Removes one member shape from a Visio-native container and optionally resizes the container around remaining members.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required
member OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public static VisioShape RemoveFromContainer(VisioPage page, VisioShape container, IEnumerable<VisioShape> members, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #

Removes member shapes from a Visio-native container and optionally resizes the container around remaining members.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required
members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public static VisioComment ReopenComment(VisioPage page, int commentId, DateTimeOffset? editedAt = null) #

Reopens a native Visio comment by its page-scoped identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
commentId int required
editedAt System.DateTimeOffset? = null optional
ReplaceMaster 3 overloads
public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, string masterNameU, bool resizeToMaster = false) #

Replaces a shape's master by universal master name while preserving its position, text, style, data, and connectors.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape required
Shape to update.
masterNameU string required
Replacement master universal name.
resizeToMaster bool = false optional
Whether to resize the shape to the replacement master's default size.

Returns

VisioShape The updated shape.
public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, VisioMaster master, bool resizeToMaster = false) #

Replaces a shape's master using an existing master instance.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape required
Shape to update.
master OfficeIMO.Visio.VisioMaster required
Replacement master.
resizeToMaster bool = false optional
Whether to resize the shape to the replacement master's default size.

Returns

VisioShape The updated shape.
public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, VisioStencilShape stencil, bool resizeToMaster = false) #

Replaces a shape's master using an OfficeIMO-native stencil definition.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape required
Shape to update.
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
Replacement stencil definition.
resizeToMaster bool = false optional
Whether to resize the shape to the stencil's default size.

Returns

VisioShape The updated shape.
public static VisioComment ReplyToComment(VisioPage page, int parentCommentId, string text, VisioCommentAuthor author, VisioCommentOptions? options = null) #

Adds a native comment reply with stable thread metadata.

Parameters

page OfficeIMO.Visio.VisioPage required
parentCommentId int required
text string required
author OfficeIMO.Visio.VisioCommentAuthor required
options OfficeIMO.Visio.VisioCommentOptions? = null optional
public static VisioShape ResizeShape(VisioPage page, VisioShape shape, OfficeLength width, OfficeLength height) #

Resizes a page-owned shape in its local axes while preserving its pin, rotation, identities, text, formatting and master links. Child frames, supported geometry, image placement and connection points follow the resize.

Parameters

page OfficeIMO.Visio.VisioPage required
Page owning the shape, including nested shapes.
shape OfficeIMO.Visio.VisioShape required
Shape to resize.
width OfficeIMO.OfficeLength required
Finite positive requested width.
height OfficeIMO.OfficeLength required
Finite positive requested height.

Returns

VisioShape The same shape instance.

Exceptions

  • NotSupportedException – The original frame is invalid, or native geometry or unequal scaling of a rotated child/text frame cannot be represented by this resize profile.
public static VisioComment ResolveComment(VisioPage page, int commentId, DateTimeOffset? editedAt = null) #

Marks a native Visio comment as done by its page-scoped identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
commentId int required
editedAt System.DateTimeOffset? = null optional
public static VisioPage ResolveConnectorLabelOverlaps(VisioPage page, double step = 0.18, int maxAttempts = 12, bool avoidShapes = true, bool avoidLabels = true, bool preferEndpointZones = false, bool avoidConnectorPaths = true, double positionStep = 0.08, int maxPositionShifts = 4, int optimizationPasses = 1) #

Moves connector label boxes away from page edges, unrelated shapes, and previously placed connector labels.

Parameters

page OfficeIMO.Visio.VisioPage required
Page whose connector labels should be adjusted.
step double = 0.18 optional
Search step in page units, expressed in inches.
maxAttempts int = 12 optional
Number of search rings to try around the current label position.
avoidShapes bool = true optional
Whether labels should avoid unrelated non-container shapes.
avoidLabels bool = true optional
Whether labels should avoid other connector labels.
preferEndpointZones bool = false optional
Whether labels should prefer common endpoint zones and avoid unrelated background zones.
avoidConnectorPaths bool = true optional
Whether labels should avoid unrelated connector paths.
positionStep double = 0.08 optional
Connector path-position search step, from 0.0 to 1.0.
maxPositionShifts int = 4 optional
Number of positive and negative connector path-position shifts to try.
optimizationPasses int = 1 optional
Number of whole-page label optimization passes to run after the initial placement sweep.

Returns

VisioPage
public static IReadOnlyList<VisioComment> ResolvedComments(VisioPage page) #

Returns native Visio comments that are marked as done.

Parameters

page OfficeIMO.Visio.VisioPage required

Returns

IReadOnlyList<VisioComment>
public static VisioPage ResolveShapeOverlaps(VisioPage page, double step = 0.25, int maxAttempts = 24, bool includeContainers = false) #

Moves overlapping top-level shapes apart using a deterministic nearest-open-position search.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to update.
step double = 0.25 optional
Search step in inches.
maxAttempts int = 24 optional
Number of search rings to try around each overlapping shape.
includeContainers bool = false optional
Whether container and background surface shapes should be moved and treated as obstacles.

Returns

VisioPage
RouteConnectorsOrthogonalAroundShapes 2 overloads
public static VisioPage RouteConnectorsOrthogonalAroundShapes(VisioPage page, double padding = 0.15, int maxLanes = 12) #

Routes every connector on the page around unrelated top-level shapes using deterministic orthogonal lanes.

Parameters

page OfficeIMO.Visio.VisioPage required
Page whose connectors should be rerouted.
padding double = 0.15 optional
Padding added around each obstacle while testing route intersections.
maxLanes int = 12 optional
Number of positive and negative routing lanes to try on each axis.

Returns

VisioPage
public static VisioPage RouteConnectorsOrthogonalAroundShapes(VisioPage page, VisioConnectorRoutingOptions options) #

Routes every connector on the page around unrelated top-level shapes using deterministic orthogonal lanes.

Parameters

page OfficeIMO.Visio.VisioPage required
Page whose connectors should be rerouted.
options OfficeIMO.Visio.VisioConnectorRoutingOptions required
Routing options controlling padding, lane search, and whether zones/containers count as obstacles.

Returns

VisioPage
SaveAsImage 2 overloads
public static OfficeConversionReport SaveAsImage(VisioPage document, string path, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Writes the selected page to a file and returns its fidelity report.

Parameters

document OfficeIMO.Visio.VisioPage required
path string required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
public static OfficeConversionReport SaveAsImage(VisioPage document, Stream stream, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Writes the selected page to a caller-owned stream and returns its fidelity report.

Parameters

document OfficeIMO.Visio.VisioPage required
stream System.IO.Stream required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
SaveAsImageAsync 2 overloads
public static async Task<OfficeConversionReport> SaveAsImageAsync(VisioPage document, string path, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes the selected page to a file and returns its fidelity report.

Parameters

document OfficeIMO.Visio.VisioPage required
path string required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
public static async Task<OfficeConversionReport> SaveAsImageAsync(VisioPage document, Stream stream, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes the selected page to a caller-owned stream and returns its fidelity report.

Parameters

document OfficeIMO.Visio.VisioPage required
stream System.IO.Stream required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
public static VisioShapeSelection SelectByMaster(VisioPage page, string masterNameU, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes created from a matching master universal name.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
masterNameU string required
Master universal name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioShapeSelection SelectByName(VisioPage page, string name, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching shape name.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioShapeSelection SelectByNameU(VisioPage page, string nameU, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching universal shape name.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
nameU string required
Universal shape name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioShapeSelection SelectCallouts(VisioPage page) #

Selects shapes marked as OfficeIMO callouts or annotations.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
public static VisioShapeSelection SelectConnectedComponent(VisioPage page, VisioShape shape, bool includeStart = true) #

Selects every shape reachable from the provided shape through connectors.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Starting shape.
includeStart bool = true optional
Whether the starting shape should be included in the returned component.
public static VisioConnectorSelection SelectConnectedConnectors(VisioPage page, VisioShape shape) #

Selects connectors that either start or end at the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape connected to or from.
public static VisioConnectorSelection SelectConnectors(VisioPage page, Func<VisioConnector, bool> predicate) #

Selects connectors matching a predicate for bulk editing.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
predicate System.Func<OfficeIMO.Visio.VisioConnector, bool> required
Predicate used to include connectors.
public static VisioConnectorSelection SelectConnectorsInLayer(VisioPage page, string layerName, StringComparison comparison = OrdinalIgnoreCase) #

Selects connectors assigned to a page layer.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
layerName string required
Layer name or universal name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
SelectConnectorsWithProtection 2 overloads
public static VisioConnectorSelection SelectConnectorsWithProtection(VisioPage page) #

Selects connectors that have at least one explicit protection cell.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
public static VisioConnectorSelection SelectConnectorsWithProtection(VisioPage page, Func<VisioProtection, bool> predicate) #

Selects connectors whose protection state matches the predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
predicate System.Func<OfficeIMO.Visio.VisioProtection, bool> required
Protection predicate.
SelectContainedIn 2 overloads
public static VisioShapeSelection SelectContainedIn(VisioPage page, VisioShapeBounds bounds) #

Selects shapes whose bounds are fully contained by the provided bounds.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
bounds OfficeIMO.Visio.VisioShapeBounds required
Containing bounds.
public static VisioShapeSelection SelectContainedIn(VisioPage page, VisioShape container, bool includeContainer = false) #

Selects shapes whose bounds are fully contained by the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
container OfficeIMO.Visio.VisioShape required
Shape whose bounds are used as the containing area.
includeContainer bool = false optional
Whether the containing shape itself should be included.
public static VisioShapeSelection SelectContainers(VisioPage page) #

Selects shapes marked as Visio-native containers.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
public static VisioShapeSelection SelectContainingText(VisioPage page, string text, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes whose text contains the provided value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
text string required
Text fragment to find.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioConnectorSelection SelectIncomingConnectors(VisioPage page, VisioShape shape) #

Selects connectors that end at the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape connected to.
SelectIntersecting 2 overloads
public static VisioShapeSelection SelectIntersecting(VisioPage page, VisioShapeBounds bounds) #

Selects shapes whose bounds intersect the provided bounds.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
bounds OfficeIMO.Visio.VisioShapeBounds required
Bounds to test against.
public static VisioShapeSelection SelectIntersecting(VisioPage page, VisioShape shape, bool includeSelf = false) #

Selects shapes whose bounds intersect the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape whose bounds are used for the test.
includeSelf bool = false optional
Whether the reference shape itself should be included.
public static VisioShapeSelection SelectLayer(VisioPage page, string layerName, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes assigned to a page layer.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
layerName string required
Layer name or universal name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioConnectorSelection SelectOutgoingConnectors(VisioPage page, VisioShape shape) #

Selects connectors that start at the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape connected from.
public static VisioShapeSelection SelectPathBetween(VisioPage page, VisioShape from, VisioShape to, bool includeEndpoints = true) #

Selects the shortest shape path between two connected shapes.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
from OfficeIMO.Visio.VisioShape required
Starting shape.
to OfficeIMO.Visio.VisioShape required
Target shape.
includeEndpoints bool = true optional
Whether the starting and target shapes should be included.
public static VisioShapeSelection SelectShapes(VisioPage page, Func<VisioShape, bool> predicate) #

Selects shapes matching a predicate for bulk editing.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
predicate System.Func<OfficeIMO.Visio.VisioShape, bool> required
Predicate used to include shapes.
SelectWithData 3 overloads
public static VisioShapeSelection SelectWithData(VisioPage page, string key) #

Selects shapes that contain the provided data key.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
key string required
Data key.
public static VisioShapeSelection SelectWithData(VisioPage page, string key, string value, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes that contain the provided data key and value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
key string required
Data key.
value string required
Data value.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioShapeSelection SelectWithData(VisioPage page, string key, Func<string?, bool> predicate) #

Selects shapes whose Shape Data value for the provided key matches a predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
key string required
Data key.
predicate System.Func<string?, bool> required
Predicate that receives the current Shape Data value.
SelectWithProtection 2 overloads
public static VisioShapeSelection SelectWithProtection(VisioPage page) #

Selects shapes that have at least one explicit protection cell.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
public static VisioShapeSelection SelectWithProtection(VisioPage page, Func<VisioShapeProtection, bool> predicate) #

Selects shapes whose protection state matches the predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
predicate System.Func<OfficeIMO.Visio.VisioShapeProtection, bool> required
Protection predicate.
SelectWithShapeData 3 overloads
public static VisioShapeSelection SelectWithShapeData(VisioPage page, string name) #

Selects shapes that contain a Visio Shape Data row.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape Data row name.
public static VisioShapeSelection SelectWithShapeData(VisioPage page, string name, string value, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching Visio Shape Data value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape Data row name.
value string required
Shape Data value.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static VisioShapeSelection SelectWithShapeData(VisioPage page, string name, Func<string?, bool> predicate) #

Selects shapes whose Visio Shape Data value for the provided row name matches a predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape Data row name.
predicate System.Func<string?, bool> required
Predicate that receives the current Shape Data value.
SelectWithUserCell 2 overloads
public static VisioShapeSelection SelectWithUserCell(VisioPage page, string name) #

Selects shapes that contain a Visio User cell.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
User cell row name.
public static VisioShapeSelection SelectWithUserCell(VisioPage page, string name, string value, StringComparison comparison = OrdinalIgnoreCase) #

Selects shapes with a matching Visio User cell value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
User cell row name.
value string required
User cell value.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.
public static IReadOnlyList<VisioShape> ShapesByMaster(VisioPage page, string masterNameU, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes created from a matching master universal name.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
masterNameU string required
Master universal name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesByName(VisioPage page, string name, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes with a matching shape name.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesByNameU(VisioPage page, string nameU, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes with a matching universal shape name.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
nameU string required
Universal shape name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
ShapesContainedIn 2 overloads
public static IReadOnlyList<VisioShape> ShapesContainedIn(VisioPage page, VisioShapeBounds bounds) #

Returns shapes whose bounds are fully contained by the provided bounds.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
bounds OfficeIMO.Visio.VisioShapeBounds required
Containing bounds.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesContainedIn(VisioPage page, VisioShape container, bool includeContainer = false) #

Returns shapes whose bounds are fully contained by the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
container OfficeIMO.Visio.VisioShape required
Shape whose bounds are used as the containing area.
includeContainer bool = false optional
Whether the containing shape itself should be included.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesContainingText(VisioPage page, string text, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes whose text contains the provided value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
text string required
Text fragment to find.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesInLayer(VisioPage page, string layerName, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes assigned to a page layer.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
layerName string required
Layer name or universal name.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
ShapesIntersecting 2 overloads
public static IReadOnlyList<VisioShape> ShapesIntersecting(VisioPage page, VisioShapeBounds bounds) #

Returns shapes whose bounds intersect the provided bounds.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
bounds OfficeIMO.Visio.VisioShapeBounds required
Bounds to test against.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesIntersecting(VisioPage page, VisioShape shape, bool includeSelf = false) #

Returns shapes whose bounds intersect the provided shape.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
shape OfficeIMO.Visio.VisioShape required
Shape whose bounds are used for the test.
includeSelf bool = false optional
Whether the reference shape itself should be included.

Returns

IReadOnlyList<VisioShape>
ShapesWithData 3 overloads
public static IReadOnlyList<VisioShape> ShapesWithData(VisioPage page, string key) #

Returns shapes that contain the provided data key.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
key string required
Data key.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesWithData(VisioPage page, string key, string value, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes that contain the provided data key and value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
key string required
Data key.
value string required
Data value.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesWithData(VisioPage page, string key, Func<string?, bool> predicate) #

Returns shapes whose Shape Data value for the provided key matches a predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
key string required
Data key.
predicate System.Func<string?, bool> required
Predicate that receives the current Shape Data value.

Returns

IReadOnlyList<VisioShape>
ShapesWithProtection 2 overloads
public static IReadOnlyList<VisioShape> ShapesWithProtection(VisioPage page) #

Returns shapes that have at least one explicit protection cell.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesWithProtection(VisioPage page, Func<VisioShapeProtection, bool> predicate) #

Returns shapes whose protection state matches the predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
predicate System.Func<OfficeIMO.Visio.VisioShapeProtection, bool> required
Protection predicate.

Returns

IReadOnlyList<VisioShape>
ShapesWithShapeData 3 overloads
public static IReadOnlyList<VisioShape> ShapesWithShapeData(VisioPage page, string name) #

Returns shapes that contain a Visio Shape Data row.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape Data row name.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesWithShapeData(VisioPage page, string name, string value, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes with a matching Visio Shape Data value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape Data row name.
value string required
Shape Data value.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesWithShapeData(VisioPage page, string name, Func<string?, bool> predicate) #

Returns shapes whose Visio Shape Data value for the provided row name matches a predicate.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
Shape Data row name.
predicate System.Func<string?, bool> required
Predicate that receives the current Shape Data value.

Returns

IReadOnlyList<VisioShape>
ShapesWithUserCell 2 overloads
public static IReadOnlyList<VisioShape> ShapesWithUserCell(VisioPage page, string name) #

Returns shapes that contain a Visio User cell.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
User cell row name.

Returns

IReadOnlyList<VisioShape>
public static IReadOnlyList<VisioShape> ShapesWithUserCell(VisioPage page, string name, string value, StringComparison comparison = OrdinalIgnoreCase) #

Returns shapes with a matching Visio User cell value.

Parameters

page OfficeIMO.Visio.VisioPage required
Page to query.
name string required
User cell row name.
value string required
User cell value.
comparison System.StringComparison = OrdinalIgnoreCase optional
String comparison used for matching.

Returns

IReadOnlyList<VisioShape>
public static OfficeConversionResult<OfficeDrawing, VisioDrawingConversionReport> ToDrawing(VisioPage page, VisioDrawingOptions? options = null, CancellationToken cancellationToken = default) #

Projects one page at its physical dimensions in points and returns source-qualified fidelity evidence.

Parameters

page OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioDrawingOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionResult<OfficeDrawing, VisioDrawingConversionReport>
ToImage 3 overloads
public static OfficeImageExportResult ToImage(VisioPage page, OfficeImageExportFormat format, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Exports a Visio page to a supported raster format or SVG.

Parameters

page OfficeIMO.Visio.VisioPage required
format OfficeIMO.Drawing.OfficeImageExportFormat required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeImageExportResult
public static OfficeImageExportResult ToImage(VisioPage document, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Renders the selected page using the encoding in OfficeImageExportOptions.Format.

Parameters

document OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeImageExportResult
public static OfficeImageExportResult ToImage(VisioPage document, VisioImageExportOptions? options, out OfficeConversionReport report, CancellationToken cancellationToken = default) #

Renders the selected page and returns its immutable fidelity report.

Parameters

document OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioImageExportOptions? required
report OfficeIMO.OfficeConversionReport required
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeImageExportResult
public static async Task<OfficeImageExportResult> ToImageAsync(VisioPage document, VisioImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Renders the selected page with cancellation and returns the encoded image and its diagnostics.

Parameters

document OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeImageExportResult>
ToSvg 2 overloads
public static string ToSvg(VisioPage document, VisioSvgSaveOptions? options = null, CancellationToken cancellationToken = default) #

Renders the selected page as decoded SVG text.

Parameters

document OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioSvgSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public static string ToSvg(VisioPage document, VisioSvgSaveOptions? options, out OfficeConversionReport report, CancellationToken cancellationToken = default) #

Renders SVG text while retaining structured image fidelity diagnostics.

Parameters

document OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioSvgSaveOptions? required
report OfficeIMO.OfficeConversionReport required
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public static Task<OfficeConversionResult<string>> ToSvgAsync(VisioPage document, VisioSvgSaveOptions? options = null, CancellationToken cancellationToken = default) #

Renders SVG text asynchronously and returns the completed report.

Parameters

document OfficeIMO.Visio.VisioPage required
options OfficeIMO.Visio.VisioSvgSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionResult<string>>
public static IReadOnlyList<VisioComment> UnresolvedComments(VisioPage page) #

Returns native Visio comments that are not marked as done.

Parameters

page OfficeIMO.Visio.VisioPage required

Returns

IReadOnlyList<VisioComment>
public static VisioComment UpdateCommentText(VisioPage page, int commentId, string text, DateTimeOffset? editedAt = null) #

Updates a native Visio comment's text by its page-scoped identifier.

Parameters

page OfficeIMO.Visio.VisioPage required
commentId int required
text string required
editedAt System.DateTimeOffset? = null optional