VisioPage
OfficeIMO.Visio
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
- Method VisioConnectorRoutingExtensions.RouteConnectorsOrthogonalAroundShapes
- Method VisioDiagramPolishExtensions.PolishDiagram
- Method VisioDiagramQualityAnalyzer.EnsureVisualQuality
- Extension method VisioDocument.DuplicatePage
- Method VisioDocument.AddBackgroundPage
- Method VisioDocument.AddPage
- Method VisioDocument.GetOrAddPage
- Method VisioDocument.GetPage
- Property VisioDocument.Pages
- Method VisioDuplicationExtensions.Duplicate
- Method VisioDuplicationExtensions.DuplicatePage
- Method VisioLayoutExtensions.CenterContent
- Method VisioLayoutExtensions.FitToContent
- Method VisioLayoutExtensions.ResolveConnectorLabelOverlaps
- Method VisioLayoutExtensions.ResolveShapeOverlaps
- Extension method VisioPage.CenterContent
- Extension method VisioPage.Duplicate
- Extension method VisioPage.EnsureVisualQuality
- Extension method VisioPage.FitToContent
- Extension method VisioPage.MoveSwimlaneActivity
- Extension method VisioPage.PolishDiagram
- Extension method VisioPage.RelayoutDiagram
- Extension method VisioPage.RelayoutSwimlaneActivities
- Extension method VisioPage.ResolveConnectorLabelOverlaps
- Extension method VisioPage.ResolveShapeOverlaps
- Extension method VisioPage.RouteConnectorsOrthogonalAroundShapes
- Method VisioPage.AddToContainer
- Method VisioPage.AddToLayer
- Method VisioPage.AlignShapes
- Method VisioPage.ApplyContainerOptions
- Method VisioPage.Callouts
- Method VisioPage.ClearBackgroundPage
- Method VisioPage.ClearConnectorRoutingPolicy
- Method VisioPage.ClearConnectorSpacing
- Method VisioPage.ClearLayoutGridPolicy
- Method VisioPage.ClearLayoutGridSizing
- Method VisioPage.ClearPlacementPolicy
- Method VisioPage.Configure
- Method VisioPage.ConfigureConnectors
- Method VisioPage.ConfigureContainer
- Method VisioPage.ConfigureContainers
- Method VisioPage.ConfigureShapes
- Method VisioPage.ConnectedComponent
- Method VisioPage.ConnectedConnectors
- Method VisioPage.ConnectorsInLayer
- Method VisioPage.ConnectorsWithHyperlink
- Method VisioPage.ConnectorsWithHyperlinks
- Method VisioPage.ConnectorsWithProtection
- Method VisioPage.DistributeShapes
- Method VisioPage.DuplicateShape
- Method VisioPage.DuplicateShapes
- Method VisioPage.Grid
- Method VisioPage.IncomingConnectors
- Method VisioPage.MoveSwimlaneActivity
- Method VisioPage.OutgoingConnectors
- Method VisioPage.PathBetween
- Method VisioPage.RefitContainer
- Method VisioPage.RelayoutConnectedComponentAsGrid
- Method VisioPage.RelayoutContainerMembers
- Method VisioPage.RelayoutShapesAsGrid
- Method VisioPage.RelayoutShapesAsHorizontalStack
- Method VisioPage.RelayoutShapesAsVerticalStack
- Method VisioPage.RemoveFromContainer
- Method VisioPage.ReplaceMaster
- Method VisioPage.ReplaceMasters
- Method VisioPage.ReplaceMastersByMaster
- Method VisioPage.SetAutoResizeDrawing
- Method VisioPage.SetBackgroundPage
- Method VisioPage.SetConnectorRouteAppearance
- Method VisioPage.SetConnectorRouteStyle
- Method VisioPage.SetConnectorSpacing
- Method VisioPage.SetDrawingSize
- Method VisioPage.SetEnableLayoutGrid
- Method VisioPage.SetLayoutGridSizing
- Method VisioPage.SetLineJumps
- Method VisioPage.SetLockDuplicate
- Method VisioPage.SetLockReplace
- Method VisioPage.SetMargins
- Method VisioPage.SetMoveShapesAwayOnDrop
- Method VisioPage.SetPlacementDepth
- Method VisioPage.SetPlacementFlip
- Method VisioPage.SetPlacementStyle
- Method VisioPage.SetPrintOrientation
- Method VisioPage.SetResizePageToFitLayout
- Method VisioPage.SetShapeSplitting
- Method VisioPage.SetUiVisibility
- Method VisioPage.ShapesByMaster
- Method VisioPage.ShapesByName
- Method VisioPage.ShapesByNameU
- Method VisioPage.ShapesContainedIn
- Method VisioPage.ShapesContainingText
- Method VisioPage.ShapesInLayer
- Method VisioPage.ShapesIntersecting
- Method VisioPage.ShapesWithData
- Method VisioPage.ShapesWithHyperlink
- Method VisioPage.ShapesWithHyperlinks
- Method VisioPage.ShapesWithProtection
- Method VisioPage.ShapesWithShapeData
- Method VisioPage.ShapesWithUserCell
- Method VisioPage.Size
- Method VisioPage.StyleContainer
- Property VisioPage.BackgroundPage
- Property VisioShapeSelection.OwnerPage
- Method VisioSwimlaneMaintenanceExtensions.MoveSwimlaneActivity
- Method VisioSwimlaneMaintenanceExtensions.RelayoutSwimlaneActivities
- Method VisioWholeDiagramRelayoutExtensions.RelayoutDiagram
Accepted by parameters 249
- Method VisioStencilGalleryExtensions.AddStencilGallery
- Method VisioStencilPageExtensions.AddStencilShape
- Method VisioCalloutExtensions.AddCallout
- Method VisioCommentExtensions.AddComment
- Method VisioCommentExtensions.AddCommentToShape
- Method VisioCommentExtensions.CommentsByAuthor
- Method VisioCommentExtensions.CommentsForShape
- Method VisioCommentExtensions.FindComment
- Method VisioCommentExtensions.GetCommentThreads
- Method VisioCommentExtensions.RemoveComment
- Method VisioCommentExtensions.RemoveCommentsForShape
- Method VisioCommentExtensions.ReopenComment
- Method VisioCommentExtensions.ReplyToComment
- Method VisioCommentExtensions.ResolveComment
- Method VisioCommentExtensions.ResolvedComments
- Method VisioCommentExtensions.UnresolvedComments
- Method VisioCommentExtensions.UpdateCommentText
- Method VisioConnectorRoutingExtensions.RouteConnectorsOrthogonalAroundShapes
- Method VisioContainerEditingExtensions.AddNestedContainer
- Method VisioContainerEditingExtensions.AddToContainer
- Method VisioContainerEditingExtensions.ApplyContainerOptions
- Method VisioContainerEditingExtensions.ConfigureContainer
- Method VisioContainerEditingExtensions.GetContainerInfo
- Method VisioContainerEditingExtensions.GetContainerMembers
- Method VisioContainerEditingExtensions.GetContainerOptions
- Method VisioContainerEditingExtensions.GetNestedContainers
- Method VisioContainerEditingExtensions.GetParentContainers
- Method VisioContainerEditingExtensions.RefitContainer
- Method VisioContainerEditingExtensions.RemoveFromContainer
- Method VisioDataGraphicEditingExtensions.AddDataGraphicLegend
- Method VisioDataGraphicEditingExtensions.GetDataGraphic
- Method VisioDataGraphicEditingExtensions.RefreshDataGraphics
- Method VisioDataGraphicEditingExtensions.RemoveDataGraphics
- Method VisioDataGraphicExtensions.AddDataGraphics
- Method VisioDiagramPolishExtensions.PolishDiagram
- Method VisioDiagramQualityAnalyzer.AnalyzeVisualQuality
- Method VisioDiagramQualityAnalyzer.EnsureVisualQuality
- Method VisioDiagramQualityAnalyzer.GetVisualQualityReport
- Extension method VisioDocument.DuplicatePage
- Method VisioDocument.AddBackgroundPage
- Method VisioDocument.AddPage
- Method VisioDocument.GetOrAddPage
- Method VisioDocument.GetPage
- Method VisioDocument.GetPage
- Method VisioDrawingExtensions.ToDrawing
- Method VisioDuplicationExtensions.Duplicate
- Method VisioDuplicationExtensions.DuplicatePage
- Method VisioDuplicationExtensions.DuplicateShapes
- Method VisioImageExportExtensions.SaveAsImage
- Method VisioImageExportExtensions.SaveAsImageAsync
- Method VisioImageExportExtensions.ToImage
- Method VisioImageExportExtensions.ToImage
- Method VisioImageExportExtensions.ToImageAsync
- Method VisioLayoutExtensions.CenterContent
- Method VisioLayoutExtensions.FitToContent
- Method VisioLayoutExtensions.GetContentBounds
- Method VisioLayoutExtensions.ResolveConnectorLabelOverlaps
- Method VisioLayoutExtensions.ResolveShapeOverlaps
- Method VisioMasterEditingExtensions.ReplaceMaster
- Extension method VisioPage.AddCallout
- Extension method VisioPage.AddComment
- Extension method VisioPage.AddCommentToShape
- Extension method VisioPage.AddDataGraphicLegend
- Extension method VisioPage.AddDataGraphics
- Extension method VisioPage.AddNestedContainer
- Extension method VisioPage.AddStencilGallery
- Extension method VisioPage.AddStencilShape
- Extension method VisioPage.AddToContainer
- Extension method VisioPage.AllShapes
- Extension method VisioPage.AnalyzeVisualQuality
- Extension method VisioPage.ApplyContainerOptions
- Extension method VisioPage.ApplyStencilMigration
- Extension method VisioPage.AssignSwimlaneActivities
- Extension method VisioPage.Callouts
- Extension method VisioPage.CenterContent
- Extension method VisioPage.CommentsByAuthor
- Extension method VisioPage.CommentsForShape
- Extension method VisioPage.ConfigureContainer
- Extension method VisioPage.ConnectedComponent
- Extension method VisioPage.ConnectedConnectors
- Extension method VisioPage.ConnectedShapes
- Extension method VisioPage.ConnectorsInLayer
- Extension method VisioPage.ConnectorsWithHyperlink
- Extension method VisioPage.ConnectorsWithHyperlinks
- Extension method VisioPage.ConnectorsWithProtection
- Extension method VisioPage.Containers
- Extension method VisioPage.Duplicate
- Extension method VisioPage.DuplicateShapes
- Extension method VisioPage.EnsureVisualQuality
- Extension method VisioPage.FindComment
- Extension method VisioPage.FindShapeById
- Extension method VisioPage.FindSwimlaneLane
- Extension method VisioPage.FindSwimlanePhase
- Extension method VisioPage.FitToContent
- Extension method VisioPage.GetCommentThreads
- Extension method VisioPage.GetContainerInfo
- Extension method VisioPage.GetContainerMembers
- Extension method VisioPage.GetContainerOptions
- Extension method VisioPage.GetContentBounds
- Extension method VisioPage.GetDataGraphic
- Extension method VisioPage.GetNestedContainers
- Extension method VisioPage.GetParentContainers
- Extension method VisioPage.GetSwimlaneActivities
- Extension method VisioPage.GetSwimlaneLanes
- Extension method VisioPage.GetSwimlanePhases
- Extension method VisioPage.GetVisualQualityReport
- Extension method VisioPage.IncomingConnectors
- Extension method VisioPage.MoveSwimlaneActivity
- Extension method VisioPage.OutgoingConnectors
- Extension method VisioPage.PathBetween
- Extension method VisioPage.PlanStencilMigration
- Extension method VisioPage.PolishDiagram
- Extension method VisioPage.RefitContainer
- Extension method VisioPage.RefreshDataGraphics
- Extension method VisioPage.RelayoutDiagram
- Extension method VisioPage.RelayoutSwimlaneActivities
- Extension method VisioPage.RemoveComment
- Extension method VisioPage.RemoveCommentsForShape
- Extension method VisioPage.RemoveDataGraphics
- Extension method VisioPage.RemoveFromContainer
- Extension method VisioPage.ReopenComment
- Extension method VisioPage.ReplaceMaster
- Extension method VisioPage.ReplyToComment
- Extension method VisioPage.ResizeShape
- Extension method VisioPage.ResolveComment
- Extension method VisioPage.ResolveConnectorLabelOverlaps
- Extension method VisioPage.ResolvedComments
- Extension method VisioPage.ResolveShapeOverlaps
- Extension method VisioPage.RouteConnectorsOrthogonalAroundShapes
- Extension method VisioPage.SaveAsImage
- Extension method VisioPage.SaveAsImageAsync
- Extension method VisioPage.SelectByMaster
- Extension method VisioPage.SelectByName
- Extension method VisioPage.SelectByNameU
- Extension method VisioPage.SelectCallouts
- Extension method VisioPage.SelectConnectedComponent
- Extension method VisioPage.SelectConnectedConnectors
- Extension method VisioPage.SelectConnectors
- Extension method VisioPage.SelectConnectorsInLayer
- Extension method VisioPage.SelectConnectorsWithHyperlink
- Extension method VisioPage.SelectConnectorsWithHyperlinks
- Extension method VisioPage.SelectConnectorsWithProtection
- Extension method VisioPage.SelectContainedIn
- Extension method VisioPage.SelectContainers
- Extension method VisioPage.SelectContainingText
- Extension method VisioPage.SelectIncomingConnectors
- Extension method VisioPage.SelectIntersecting
- Extension method VisioPage.SelectLayer
- Extension method VisioPage.SelectOutgoingConnectors
- Extension method VisioPage.SelectPathBetween
- Extension method VisioPage.SelectShapes
- Extension method VisioPage.SelectWithData
- Extension method VisioPage.SelectWithHyperlink
- Extension method VisioPage.SelectWithHyperlinks
- Extension method VisioPage.SelectWithProtection
- Extension method VisioPage.SelectWithShapeData
- Extension method VisioPage.SelectWithUserCell
- Extension method VisioPage.ShapesByMaster
- Extension method VisioPage.ShapesByName
- Extension method VisioPage.ShapesByNameU
- Extension method VisioPage.ShapesContainedIn
- Extension method VisioPage.ShapesContainingText
- Extension method VisioPage.ShapesInLayer
- Extension method VisioPage.ShapesIntersecting
- Extension method VisioPage.ShapesWithData
- Extension method VisioPage.ShapesWithHyperlink
- Extension method VisioPage.ShapesWithHyperlinks
- Extension method VisioPage.ShapesWithProtection
- Extension method VisioPage.ShapesWithShapeData
- Extension method VisioPage.ShapesWithUserCell
- Extension method VisioPage.ToDrawing
- Extension method VisioPage.ToImage
- Extension method VisioPage.ToImage
- Extension method VisioPage.ToImageAsync
- Extension method VisioPage.ToSvg
- Extension method VisioPage.ToSvgAsync
- Extension method VisioPage.UnresolvedComments
- Extension method VisioPage.UpdateCommentText
- Method VisioPage.Configure
- Method VisioPage.SetBackgroundPage
- Method VisioPageQueryExtensions.AllShapes
- Method VisioPageQueryExtensions.Callouts
- Method VisioPageQueryExtensions.ConnectedComponent
- Method VisioPageQueryExtensions.ConnectedConnectors
- Method VisioPageQueryExtensions.ConnectedShapes
- Method VisioPageQueryExtensions.ConnectorsInLayer
- Method VisioPageQueryExtensions.ConnectorsWithHyperlink
- Method VisioPageQueryExtensions.ConnectorsWithHyperlinks
- Method VisioPageQueryExtensions.ConnectorsWithProtection
- Method VisioPageQueryExtensions.Containers
- Method VisioPageQueryExtensions.FindShapeById
- Method VisioPageQueryExtensions.IncomingConnectors
- Method VisioPageQueryExtensions.OutgoingConnectors
- Method VisioPageQueryExtensions.PathBetween
- Method VisioPageQueryExtensions.SelectByMaster
- Method VisioPageQueryExtensions.SelectByName
- Method VisioPageQueryExtensions.SelectByNameU
- Method VisioPageQueryExtensions.SelectCallouts
- Method VisioPageQueryExtensions.SelectConnectedComponent
- Method VisioPageQueryExtensions.SelectConnectedConnectors
- Method VisioPageQueryExtensions.SelectConnectors
- Method VisioPageQueryExtensions.SelectConnectorsInLayer
- Method VisioPageQueryExtensions.SelectConnectorsWithHyperlink
- Method VisioPageQueryExtensions.SelectConnectorsWithHyperlinks
- Method VisioPageQueryExtensions.SelectConnectorsWithProtection
- Method VisioPageQueryExtensions.SelectContainedIn
- Method VisioPageQueryExtensions.SelectContainers
- Method VisioPageQueryExtensions.SelectContainingText
- Method VisioPageQueryExtensions.SelectIncomingConnectors
- Method VisioPageQueryExtensions.SelectIntersecting
- Method VisioPageQueryExtensions.SelectLayer
- Method VisioPageQueryExtensions.SelectOutgoingConnectors
- Method VisioPageQueryExtensions.SelectPathBetween
- Method VisioPageQueryExtensions.SelectShapes
- Method VisioPageQueryExtensions.SelectWithData
- Method VisioPageQueryExtensions.SelectWithHyperlink
- Method VisioPageQueryExtensions.SelectWithHyperlinks
- Method VisioPageQueryExtensions.SelectWithProtection
- Method VisioPageQueryExtensions.SelectWithShapeData
- Method VisioPageQueryExtensions.SelectWithUserCell
- Method VisioPageQueryExtensions.ShapesByMaster
- Method VisioPageQueryExtensions.ShapesByName
- Method VisioPageQueryExtensions.ShapesByNameU
- Method VisioPageQueryExtensions.ShapesContainedIn
- Method VisioPageQueryExtensions.ShapesContainingText
- Method VisioPageQueryExtensions.ShapesInLayer
- Method VisioPageQueryExtensions.ShapesIntersecting
- Method VisioPageQueryExtensions.ShapesWithData
- Method VisioPageQueryExtensions.ShapesWithHyperlink
- Method VisioPageQueryExtensions.ShapesWithHyperlinks
- Method VisioPageQueryExtensions.ShapesWithProtection
- Method VisioPageQueryExtensions.ShapesWithShapeData
- Method VisioPageQueryExtensions.ShapesWithUserCell
- Method VisioShapeResizeExtensions.ResizeShape
- Constructor VisioShapeSelection.VisioShapeSelection
- Method VisioStencilMigrationExtensions.ApplyStencilMigration
- Method VisioStencilMigrationPlanApplyExtensions.ApplyStencilMigration
- Method VisioStencilMigrationPlanningExtensions.PlanStencilMigration
- Method VisioSvgExportExtensions.ToSvg
- Method VisioSvgExportExtensions.ToSvgAsync
- Method VisioSwimlaneMaintenanceExtensions.AssignSwimlaneActivities
- Method VisioSwimlaneMaintenanceExtensions.FindSwimlaneLane
- Method VisioSwimlaneMaintenanceExtensions.FindSwimlanePhase
- Method VisioSwimlaneMaintenanceExtensions.GetSwimlaneActivities
- Method VisioSwimlaneMaintenanceExtensions.GetSwimlaneLanes
- Method VisioSwimlaneMaintenanceExtensions.GetSwimlanePhases
- Method VisioSwimlaneMaintenanceExtensions.MoveSwimlaneActivity
- Method VisioSwimlaneMaintenanceExtensions.RelayoutSwimlaneActivities
- Method VisioWholeDiagramRelayoutExtensions.RelayoutDiagram
Constructors
public VisioPage(string name) #Initializes a new instance of the VisioPage class with default A4 size.
Parameters
- name string
- Name of the page.
public VisioPage(string name, OfficeLength width, OfficeLength height) #Creates geometry from explicit physical lengths.
Parameters
- name string
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
Methods
public VisioShape AddCircle(OfficeLength x, OfficeLength y, OfficeLength diameter, string? text = null) #Applies physical lengths to the native Visio geometry.
Parameters
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- diameter OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- diameter OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- toId string
- kind OfficeIMO.Visio.ConnectorKind = Dynamic
- fromSide OfficeIMO.Visio.VisioSide = Auto
- toSide OfficeIMO.Visio.VisioSide = Auto
- configure System.Action<OfficeIMO.Visio.VisioConnector>? = null
Returns
VisioConnectorpublic 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
- Identifier of the connector.
- from OfficeIMO.Visio.VisioShape
- Shape from which the connector starts.
- to OfficeIMO.Visio.VisioShape
- Shape to which the connector ends.
- kind OfficeIMO.Visio.ConnectorKind
- Type of connector.
- fromSide OfficeIMO.Visio.VisioSide = Auto
- Preferred side on the source shape.
- toSide OfficeIMO.Visio.VisioSide = Auto
- Preferred side on the target shape.
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
- start OfficeIMO.Drawing.OfficePoint
- end OfficeIMO.Drawing.OfficePoint
- kind OfficeIMO.Visio.ConnectorKind = Straight
- unit OfficeIMO.Visio.VisioMeasurementUnit? = null
Returns
VisioConnectorpublic 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
- Source shape.
- to OfficeIMO.Visio.VisioShape
- Target shape.
- kind OfficeIMO.Visio.ConnectorKind = Dynamic
- Connector kind (straight, curved, etc.).
- fromSide OfficeIMO.Visio.VisioSide = Auto
- Preferred side on the source shape.
- toSide OfficeIMO.Visio.VisioSide = Auto
- Preferred side on the target shape.
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
- text string
- memberIds System.Collections.Generic.IEnumerable<string>
- options OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic 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
- text string
- memberIds System.Collections.Generic.IEnumerable<string>
- configure System.Action<OfficeIMO.Visio.VisioContainerOptions>
Returns
VisioShapepublic 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
- Container shape identifier.
- text string
- Container heading text.
- members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- Shapes that should belong to the container.
- options OfficeIMO.Visio.VisioContainerOptions? = null
- Optional container layout and style settings.
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
- pinX OfficeIMO.OfficeLength
- pinY OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
- options OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- Layer display name.
- nameU string? = null
- Optional universal name.
Returns
VisioLayerpublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- master OfficeIMO.Visio.VisioMaster
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- w OfficeIMO.OfficeLength
- h OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- masterNameU string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- w OfficeIMO.OfficeLength
- h OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic VisioShape AddSquare(OfficeLength x, OfficeLength y, OfficeLength size, string? text = null) #Applies physical lengths to the native Visio geometry.
Parameters
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- size OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- size OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
- configure System.Action<OfficeIMO.Visio.VisioShape>? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
- configure System.Action<OfficeIMO.Visio.VisioShape>? = null
Returns
VisioShapepublic 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
- id string = "title"
- height OfficeIMO.OfficeLength? = null
- topMargin OfficeIMO.OfficeLength? = null
- configure System.Action<OfficeIMO.Visio.VisioShape>? = null
Returns
VisioShapepublic VisioPage AddToContainer(string containerId, IEnumerable<string> memberIds, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Adds existing shapes to a Visio-native container.
Parameters
- containerId string
- memberIds System.Collections.Generic.IEnumerable<string>
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioPagepublic 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
- memberIds System.Collections.Generic.IEnumerable<string>
- configureResizeOptions System.Action<OfficeIMO.Visio.VisioContainerOptions>
Returns
VisioPagepublic VisioPage AddToLayer(string layerName, VisioShape shape) #Adds a shape to a page layer, creating the layer if needed.
Parameters
- layerName string
- Layer name.
- shape OfficeIMO.Visio.VisioShape
- Shape to assign.
Returns
VisioPagepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic VisioPage AlignShapes(VisioHorizontalAlignment alignment, IEnumerable<string> shapeIds) #Aligns existing shapes by id using the current selection bounds.
Parameters
- alignment OfficeIMO.Visio.VisioHorizontalAlignment
- Horizontal alignment to apply.
- shapeIds System.Collections.Generic.IEnumerable<string>
- Shape ids to align.
Returns
VisioPagepublic VisioPage AlignShapes(VisioVerticalAlignment alignment, IEnumerable<string> shapeIds) #Aligns existing shapes by id using the current selection bounds.
Parameters
- alignment OfficeIMO.Visio.VisioVerticalAlignment
- Vertical alignment to apply.
- shapeIds System.Collections.Generic.IEnumerable<string>
- Shape ids to align.
Returns
VisioPagepublic 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
- options OfficeIMO.Visio.VisioContainerOptions
- refit bool = false
Returns
VisioPagepublic VisioPage Callouts(Action<VisioShapeSelection> configure) #Selects OfficeIMO callout or annotation shapes and configures them.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic VisioPage ClearBackgroundPage() #Removes the applied background page reference.
Returns
VisioPagepublic VisioPage ClearConnectorRoutingPolicy() #Clears page-level connector routing and line-jump policy cells so Visio can use template defaults.
Returns
VisioPagepublic VisioPage ClearConnectorSpacing() #Clears page-level connector spacing cells so Visio can use template defaults.
Returns
VisioPagepublic VisioPage ClearLayoutGridPolicy() #Clears Visio layout grid enablement and sizing cells so Visio can use template defaults.
Returns
VisioPagepublic VisioPage ClearLayoutGridSizing() #Clears Visio layout grid sizing cells so Visio can use template defaults.
Returns
VisioPagepublic VisioPage ClearPlacementPolicy() #Clears page-level placement policy cells so Visio can use template defaults.
Returns
VisioPagepublic VisioPage Configure(Action<VisioPage> configure) #Configures this page and checks identifiers before and after the callback.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioPage>
Returns
VisioPagepublic VisioPage ConfigureConnectors(Action<VisioConnectorSelection> configure) #Configures all connectors on the page.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
- Configuration to apply to the selected connectors.
Returns
VisioPagepublic 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>
- Predicate used to select connectors.
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
- Configuration to apply to the selected connectors.
Returns
VisioPagepublic 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
- configureOptions System.Action<OfficeIMO.Visio.VisioContainerOptions>
- refit bool = false
Returns
VisioPagepublic VisioPage ConfigureContainers(Action<VisioShapeSelection> configure) #Selects Visio-native container shapes and configures them.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic VisioPage ConfigureShapes(Action<VisioShapeSelection> configure) #Configures all shapes on the page, including grouped children.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- Configuration to apply to the selected shapes.
Returns
VisioPagepublic 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>
- Predicate used to select shapes.
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- Configuration to apply to the selected shapes.
Returns
VisioPagepublic 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
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- includeStart bool = true
Returns
VisioPagepublic VisioPage ConnectedConnectors(string shapeId, Action<VisioConnectorSelection> configure) #Selects connectors attached to the provided shape and configures them.
Parameters
- shapeId string
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
Returns
VisioPagepublic VisioPage ConnectorsInLayer(string layerName, Action<VisioConnectorSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects connectors assigned to a page layer and configures them.
Parameters
- layerName string
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ConnectorsWithHyperlink(string address, Action<VisioConnectorSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects connectors with a matching hyperlink address and configures them.
Parameters
- address string
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ConnectorsWithHyperlinks(Action<VisioConnectorSelection> configure) #Selects connectors with at least one hyperlink and configures them.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
Returns
VisioPagepublic VisioPage ConnectorsWithProtection(Action<VisioConnectorSelection> configure) #Selects connectors with any explicit protection cell and configures them.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
Returns
VisioPagepublic 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>
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
Returns
VisioPagepublic VisioContainerInfo ContainerInfo(string containerId) #Gets typed metadata and membership information for a Visio-native container.
Parameters
- containerId string
Returns
VisioContainerInfopublic VisioPage DistributeShapes(VisioDistributionAxis axis, IEnumerable<string> shapeIds) #Distributes existing shapes by center point along the requested axis.
Parameters
- axis OfficeIMO.Visio.VisioDistributionAxis
- Distribution axis.
- shapeIds System.Collections.Generic.IEnumerable<string>
- Shape ids to distribute.
Returns
VisioPagepublic 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
- Identifier of the shape to duplicate.
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null
- Optional configuration for the duplicated selection.
Returns
VisioPagepublic VisioPage DuplicateShape(string shapeId, VisioShapeDuplicationOptions? options, Action<VisioShapeSelection>? configure = null) #Duplicates one shape by id using explicit duplication options.
Parameters
- shapeId string
- Identifier of the shape to duplicate.
- options OfficeIMO.Visio.VisioShapeDuplicationOptions?
- Duplication options.
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null
- Optional configuration for the duplicated selection.
Returns
VisioPagepublic 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>
- Shape identifiers to duplicate.
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null
- Optional configuration for the duplicated selection.
Returns
VisioPagepublic 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>
- Shape identifiers to duplicate.
- options OfficeIMO.Visio.VisioShapeDuplicationOptions?
- Duplication options.
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>? = null
- Optional configuration for the duplicated selection.
Returns
VisioPagepublic VisioLayer? FindLayer(string nameOrNameU) #Finds a layer by display name or universal name.
Parameters
- nameOrNameU string
- Layer name to find.
Returns
VisioLayer?public VisioShape GetShape(string id) #Gets an existing shape by identifier, throwing when it is missing.
Parameters
- id string
Returns
VisioShapepublic VisioShape GetShape(string id, Action<VisioShape> configure) #Configures an existing shape selected by its current identifier.
Parameters
- id string
- configure System.Action<OfficeIMO.Visio.VisioShape>
Returns
VisioShapepublic VisioPage Grid(bool visible, bool snap) #Configures grid visibility and snapping.
Parameters
- visible bool
- Whether the grid is visible.
- snap bool
- Whether snapping is enabled.
public VisioPage IncomingConnectors(string shapeId, Action<VisioConnectorSelection> configure) #Selects connectors that end at the provided shape and configures them.
Parameters
- shapeId string
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
Returns
VisioPagepublic 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
- laneId string
- phaseId string
- configureOptions System.Action<OfficeIMO.Visio.VisioSwimlaneRelayoutOptions>
Returns
VisioPagepublic VisioPage OutgoingConnectors(string shapeId, Action<VisioConnectorSelection> configure) #Selects connectors that start at the provided shape and configures them.
Parameters
- shapeId string
- configure System.Action<OfficeIMO.Visio.VisioConnectorSelection>
Returns
VisioPagepublic 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
- toId string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- includeEndpoints bool = true
Returns
VisioPagepublic 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
- newFrom OfficeIMO.Visio.VisioShape
- newTo OfficeIMO.Visio.VisioShape
- fromSide OfficeIMO.Visio.VisioSide = Auto
- toSide OfficeIMO.Visio.VisioSide = Auto
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
- newTo OfficeIMO.Visio.VisioShape
- side OfficeIMO.Visio.VisioSide = Auto
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
- newFrom OfficeIMO.Visio.VisioShape
- side OfficeIMO.Visio.VisioSide = Auto
public VisioPage RefitContainer(string containerId, VisioContainerOptions? options = null) #Resizes a Visio-native container around its current members.
Parameters
- containerId string
- options OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioPagepublic VisioPage RefitContainer(string containerId, Action<VisioContainerOptions> configureOptions) #Resizes a Visio-native container around its current members using inline option configuration.
Parameters
- containerId string
- configureOptions System.Action<OfficeIMO.Visio.VisioContainerOptions>
Returns
VisioPagepublic VisioPage RelayoutConnectedComponentAsGrid(string shapeId, VisioSelectionLayoutOptions? options = null, bool includeStart = true) #Relays out all shapes reachable from a starting shape through connectors.
Parameters
- shapeId string
- Starting shape id.
- options OfficeIMO.Visio.VisioSelectionLayoutOptions? = null
- Optional layout settings.
- includeStart bool = true
- Whether the starting shape should be included in the relayout.
Returns
VisioPagepublic 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
- Container shape id.
- layoutOptions OfficeIMO.Visio.VisioSelectionLayoutOptions? = null
- Optional member layout settings.
- refitContainer bool = true
- Whether the container should be resized after member relayout.
- refitOptions OfficeIMO.Visio.VisioContainerOptions? = null
- Optional container refit settings.
Returns
VisioPagepublic 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
- Container shape id.
- configureLayoutOptions System.Action<OfficeIMO.Visio.VisioSelectionLayoutOptions>
- Layout option callback.
- refitContainer bool = true
- Whether the container should be resized after member relayout.
- refitOptions OfficeIMO.Visio.VisioContainerOptions? = null
- Optional container refit settings.
Returns
VisioPagepublic 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>
- Shape ids to relayout.
- options OfficeIMO.Visio.VisioSelectionLayoutOptions? = null
- Optional layout settings.
Returns
VisioPagepublic 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>
- Shape ids to relayout.
- configureOptions System.Action<OfficeIMO.Visio.VisioSelectionLayoutOptions>
- Option callback.
Returns
VisioPagepublic 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>
- Shape ids to relayout.
- spacing double = 0.5
- Horizontal spacing between shapes in inches.
- routeInternalConnectors bool = true
- Whether connectors whose endpoints are both selected should be rerouted orthogonally.
Returns
VisioPagepublic 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>
- Shape ids to relayout.
- spacing double = 0.5
- Vertical spacing between shapes in inches.
- routeInternalConnectors bool = true
- Whether connectors whose endpoints are both selected should be rerouted orthogonally.
Returns
VisioPagepublic VisioPage RemoveFromContainer(string containerId, IEnumerable<string> memberIds, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Removes existing shapes from a Visio-native container.
Parameters
- containerId string
- memberIds System.Collections.Generic.IEnumerable<string>
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioPagepublic 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
- memberIds System.Collections.Generic.IEnumerable<string>
- configureResizeOptions System.Action<OfficeIMO.Visio.VisioContainerOptions>
Returns
VisioPagepublic 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
- The shape to move.
- newParent OfficeIMO.Visio.VisioShape
- The group that should own the shape after the move.
- childIndex int = -1
- Optional insertion index within the target group's children. Use -1 to append.
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
- masterNameU string
- resizeToMaster bool = false
Returns
VisioPagepublic 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
- master OfficeIMO.Visio.VisioMaster
- resizeToMaster bool = false
Returns
VisioPagepublic 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
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- resizeToMaster bool = false
Returns
VisioPagepublic 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>
- masterNameU string
- resizeToMaster bool = false
Returns
VisioPagepublic 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>
- master OfficeIMO.Visio.VisioMaster
- resizeToMaster bool = false
Returns
VisioPagepublic 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>
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- resizeToMaster bool = false
Returns
VisioPagepublic VisioPage ReplaceMastersByMaster(string currentMasterNameU, string replacementMasterNameU, bool resizeToMaster = false, StringComparison comparison = OrdinalIgnoreCase) #Replaces shapes using a matching current master universal name.
Parameters
- currentMasterNameU string
- replacementMasterNameU string
- resizeToMaster bool = false
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic 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
- replacementStencil OfficeIMO.Visio.Stencils.VisioStencilShape
- resizeToMaster bool = false
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic 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
- The existing shape referenced by matching connectors.
- newShape OfficeIMO.Visio.VisioShape
- The replacement shape that matching connectors should reference.
- endpointScope OfficeIMO.Visio.VisioConnectorEndpointScope = Both
- Controls whether start points, end points, or both are updated.
- fromSide OfficeIMO.Visio.VisioSide = Auto
- The side to glue to when a start point is updated.
- toSide OfficeIMO.Visio.VisioSide = Auto
- The side to glue to when an end point is updated.
public VisioPage SetAutoResizeDrawing(bool enabled = true) #Enables or disables automatic page resizing to fit the diagram.
Parameters
- enabled bool = true
- Whether automatic drawing resize is enabled.
Returns
VisioPagepublic VisioPage SetBackgroundPage(VisioPage backgroundPage) #Applies a reusable Visio background page to this page.
Parameters
- backgroundPage OfficeIMO.Visio.VisioPage
- Background page to apply.
Returns
VisioPagepublic VisioPage SetConnectorRouteAppearance(VisioLineRouteExtension appearance) #Sets the default appearance for routed connectors on this page.
Parameters
- appearance OfficeIMO.Visio.VisioLineRouteExtension
- Default routed connector appearance.
Returns
VisioPagepublic VisioPage SetConnectorRouteStyle(VisioPageRouteStyle style) #Sets Visio's page-level connector routing style.
Parameters
- style OfficeIMO.Visio.VisioPageRouteStyle
- Routing style to use for connectors without local routing.
Returns
VisioPagepublic 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
- Horizontal and vertical connector-to-connector clearance.
- lineToNode double
- Horizontal and vertical connector-to-shape clearance.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit for the provided values.
Returns
VisioPagepublic 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
- Horizontal connector-to-connector clearance.
- lineToLineY double
- Vertical connector-to-connector clearance.
- lineToNodeX double
- Horizontal connector-to-shape clearance.
- lineToNodeY double
- Vertical connector-to-shape clearance.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit for the provided values.
Returns
VisioPagepublic VisioPage SetDrawingSize(VisioDrawingSizeType sizeType) #Sets how Visio determines the drawing page size.
Parameters
- sizeType OfficeIMO.Visio.VisioDrawingSizeType
- Drawing size behavior.
Returns
VisioPagepublic VisioPage SetEnableLayoutGrid(bool enabled = true) #Enables or disables Visio's internal layout grid for page layout.
Parameters
- enabled bool = true
- Whether Visio should use the internal layout grid.
Returns
VisioPagepublic VisioPage SetLayoutGridSizing(double blockSize, double avenueSize, VisioMeasurementUnit unit = Inches) #Sets Visio layout grid block sizes and spacing values.
Parameters
- blockSize double
- Horizontal and vertical average shape block size.
- avenueSize double
- Horizontal and vertical spacing between shapes.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit for the provided values.
Returns
VisioPagepublic 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
- Horizontal average shape block size.
- blockSizeY double
- Vertical average shape block size.
- avenueSizeX double
- Horizontal spacing between shapes.
- avenueSizeY double
- Vertical spacing between shapes.
- unit OfficeIMO.Visio.VisioMeasurementUnit = Inches
- Measurement unit for the provided values.
Returns
VisioPagepublic 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
- Line jump style.
- code OfficeIMO.Visio.VisioLineJumpCode
- Which connectors receive line jumps.
- horizontalDirection OfficeIMO.Visio.VisioHorizontalLineJumpDirection = Default
- Default jump direction for horizontal dynamic connectors.
- verticalDirection OfficeIMO.Visio.VisioVerticalLineJumpDirection = Default
- Default jump direction for vertical dynamic connectors.
Returns
VisioPagepublic VisioPage SetLockDuplicate(bool locked = true) #Locks or unlocks page duplication.
Parameters
- locked bool = true
- Whether duplication is locked.
Returns
VisioPagepublic VisioPage SetLockReplace(bool locked = true) #Locks or unlocks page replacement.
Parameters
- locked bool = true
- Whether replacement is locked.
Returns
VisioPagepublic VisioPage SetMargins(OfficeLength margin) #Applies physical lengths to the native Visio geometry.
Parameters
- margin OfficeIMO.OfficeLength
Returns
VisioPagepublic VisioPage SetMargins(OfficeLength horizontal, OfficeLength vertical) #Applies physical lengths to the native Visio geometry.
Parameters
- horizontal OfficeIMO.OfficeLength
- vertical OfficeIMO.OfficeLength
Returns
VisioPagepublic VisioPage SetMargins(OfficeLength left, OfficeLength right, OfficeLength top, OfficeLength bottom) #Applies physical lengths to the native Visio geometry.
Parameters
- left OfficeIMO.OfficeLength
- right OfficeIMO.OfficeLength
- top OfficeIMO.OfficeLength
- bottom OfficeIMO.OfficeLength
Returns
VisioPagepublic VisioPage SetMoveShapesAwayOnDrop(bool enabled = true) #Enables or disables moving nearby shapes away on drop.
Parameters
- enabled bool = true
- Whether nearby placeable shapes move away on drop.
Returns
VisioPagepublic VisioPage SetPlacementDepth(VisioPlacementDepth depth) #Sets Visio's page-level placement analysis depth.
Parameters
- depth OfficeIMO.Visio.VisioPlacementDepth
- Placement depth.
Returns
VisioPagepublic VisioPage SetPlacementFlip(VisioPlacementFlip flip) #Sets Visio's page-level placement flip behavior.
Parameters
- flip OfficeIMO.Visio.VisioPlacementFlip
- Placement flip flags.
Returns
VisioPagepublic VisioPage SetPlacementStyle(VisioPlacementStyle style) #Sets Visio's page-level placement style.
Parameters
- style OfficeIMO.Visio.VisioPlacementStyle
- Placement style.
Returns
VisioPagepublic VisioPage SetPrintOrientation(VisioPagePrintOrientation orientation) #Sets print orientation.
Parameters
- orientation OfficeIMO.Visio.VisioPagePrintOrientation
- Print orientation.
Returns
VisioPagepublic VisioPage SetResizePageToFitLayout(bool enabled = true) #Enables or disables enlarging the page after Visio lays out shapes.
Parameters
- enabled bool = true
- Whether Visio should resize the page after layout.
Returns
VisioPagepublic VisioPage SetShapeSplitting(bool enabled = true) #Enables or disables automatic shape splitting on this page.
Parameters
- enabled bool = true
- Whether automatic shape splitting is enabled.
Returns
VisioPagepublic VisioPage SetUiVisibility(VisioPageUiVisibility visibility) #Shows or hides the page name in Visio UI page lists.
Parameters
- visibility OfficeIMO.Visio.VisioPageUiVisibility
- Page UI visibility.
Returns
VisioPagepublic 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
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ShapesByName(string name, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes with a matching shape name and configures them.
Parameters
- name string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ShapesByNameU(string nameU, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes with a matching universal shape name and configures them.
Parameters
- nameU string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic 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
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic VisioPage ShapesContainedIn(string containerId, Action<VisioShapeSelection> configure, bool includeContainer = false) #Selects shapes fully contained by a reference shape and configures them.
Parameters
- containerId string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- includeContainer bool = false
Returns
VisioPagepublic VisioPage ShapesContainingText(string text, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes whose text contains the provided value and configures them.
Parameters
- text string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ShapesInLayer(string layerName, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes in a page layer and configures them.
Parameters
- layerName string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic 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
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic VisioPage ShapesIntersecting(string shapeId, Action<VisioShapeSelection> configure, bool includeSelf = false) #Selects shapes whose bounds intersect a reference shape and configures them.
Parameters
- shapeId string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- includeSelf bool = false
Returns
VisioPagepublic 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
- value string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic 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
- predicate System.Func<string?, bool>
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic VisioPage ShapesWithHyperlink(string address, Action<VisioShapeSelection> configure, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes with a matching hyperlink address and configures them.
Parameters
- address string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ShapesWithHyperlinks(Action<VisioShapeSelection> configure) #Selects shapes with at least one hyperlink and configures them.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic VisioPage ShapesWithProtection(Action<VisioShapeSelection> configure) #Selects shapes with any explicit protection cell and configures them.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic 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>
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic 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
- value string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage ShapesWithUserCell(string name, Action<VisioShapeSelection> configure) #Selects shapes that contain a Visio User cell and configures them.
Parameters
- name string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
Returns
VisioPagepublic 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
- value string
- configure System.Action<OfficeIMO.Visio.VisioShapeSelection>
- comparison System.StringComparison = OrdinalIgnoreCase
Returns
VisioPagepublic VisioPage Size(OfficeLength w, OfficeLength h) #Applies physical lengths to the native Visio geometry.
Parameters
- w OfficeIMO.OfficeLength
- h OfficeIMO.OfficeLength
Returns
VisioPagepublic VisioPage StyleContainer(string containerId, VisioShapeStyle style, bool refit = false) #Applies a reusable visual style to an existing Visio-native container.
Parameters
- containerId string
- style OfficeIMO.Visio.VisioShapeStyle
- refit bool = false
Returns
VisioPagepublic IReadOnlyList<VisioShape> UngroupShape(VisioShape group) #Removes a group shape and promotes its children into the group's former position.
Parameters
- group OfficeIMO.Visio.VisioShape
- The group to ungroup.
Inherited Methods
Properties
public int Id { get; internal set; } #Gets the identifier of the page within the document.
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<VisioComment> Comments { get; } #Native Visio comments attached to this page.
Extension Methods
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
- target OfficeIMO.Visio.VisioShape
- text string
- pinX OfficeIMO.OfficeLength
- pinY OfficeIMO.OfficeLength
- options OfficeIMO.Visio.VisioCalloutOptions? = null
Returns
VisioShapepublic 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
- target OfficeIMO.Visio.VisioShape
- text string
- placement OfficeIMO.Visio.VisioSide
- gap OfficeIMO.OfficeLength? = null
- options OfficeIMO.Visio.VisioCalloutOptions? = null
Returns
VisioShapepublic 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
- target OfficeIMO.Visio.VisioShape
- id string
- text string
- pinX OfficeIMO.OfficeLength
- pinY OfficeIMO.OfficeLength
- options OfficeIMO.Visio.VisioCalloutOptions? = null
Returns
VisioShapepublic 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
- target OfficeIMO.Visio.VisioShape
- id string
- text string
- placement OfficeIMO.Visio.VisioSide
- gap OfficeIMO.OfficeLength? = null
- options OfficeIMO.Visio.VisioCalloutOptions? = null
Returns
VisioShapepublic 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
- text string
- authorName string? = null
- authorInitials string? = null
- options OfficeIMO.Visio.VisioCommentOptions? = null
Returns
VisioCommentpublic 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
- target OfficeIMO.Visio.VisioShape
- text string
- authorName string? = null
- authorInitials string? = null
- options OfficeIMO.Visio.VisioCommentOptions? = null
Returns
VisioCommentpublic 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
- shapeId string
- text string
- authorName string? = null
- authorInitials string? = null
- options OfficeIMO.Visio.VisioCommentOptions? = null
Returns
VisioCommentpublic 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
- id string
- title string
- definition OfficeIMO.Visio.VisioDataGraphic
- pinX double
- pinY double
- width double = 2.4
Returns
VisioDataGraphicLegendpublic static IReadOnlyList<VisioShape> AddDataGraphics(VisioPage page, VisioShape target, VisioDataGraphic dataGraphic) #Adds visible data graphics for one target shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the target shape.
- target OfficeIMO.Visio.VisioShape
- Shape whose Shape Data values should be visualized.
- dataGraphic OfficeIMO.Visio.VisioDataGraphic
- 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
- parent OfficeIMO.Visio.VisioShape
- child OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic 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
- Target page.
- catalog OfficeIMO.Visio.Stencils.VisioStencilCatalog
- Stencil catalog to render.
- options OfficeIMO.Visio.Stencils.VisioStencilGalleryOptions? = null
- Optional gallery layout and visual options.
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
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- id string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- id string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- catalog OfficeIMO.Visio.Stencils.VisioStencilCatalog
- stencilIdOrName string
- id string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- catalog OfficeIMO.Visio.Stencils.VisioStencilCatalog
- stencilIdOrName string
- id string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- stencilIdOrName string
- id string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- stencilIdOrName string
- id string
- x OfficeIMO.OfficeLength
- y OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string? = null
Returns
VisioShapepublic 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
- container OfficeIMO.Visio.VisioShape
- member OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic 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
- container OfficeIMO.Visio.VisioShape
- members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic static IReadOnlyList<VisioShape> AllShapes(VisioPage page) #Returns all shapes on the page, including shapes nested inside groups.
Parameters
- page OfficeIMO.Visio.VisioPage
- 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
- Page to analyze.
- options OfficeIMO.Visio.VisioDiagramQualityOptions? = null
- 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
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape to update.
- options OfficeIMO.Visio.VisioContainerOptions
- Container metadata and style options.
- refit bool = false
- Whether the container should be refit around current members after metadata is applied.
Returns
VisioShapepublic 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
- map OfficeIMO.Visio.VisioStencilMigrationMap
Returns
VisioStencilMigrationResultpublic 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
- Page to update.
- plan OfficeIMO.Visio.VisioStencilMigrationPlan
- Reviewed migration plan.
- map OfficeIMO.Visio.VisioStencilMigrationMap
- Migration map used to create the plan.
Returns
VisioStencilMigrationResultpublic 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
public static IReadOnlyList<VisioShape> Callouts(VisioPage page) #Returns shapes marked as OfficeIMO callouts or annotations.
Parameters
- page OfficeIMO.Visio.VisioPage
- 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
- Page to update.
Returns
VisioPagepublic static IReadOnlyList<VisioComment> CommentsByAuthor(VisioPage page, VisioCommentAuthor author) #Returns comments written by one stable author identity.
Parameters
- page OfficeIMO.Visio.VisioPage
- author OfficeIMO.Visio.VisioCommentAuthor
Returns
IReadOnlyList<VisioComment>public static IReadOnlyList<VisioComment> CommentsForShape(VisioPage page, VisioShape target) #Returns comments that target the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- target OfficeIMO.Visio.VisioShape
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
- shapeId string
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
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape to update.
- configure System.Action<OfficeIMO.Visio.VisioContainerOptions>
- Option callback.
- refit bool = false
- Whether the container should be refit around current members after metadata is applied.
Returns
VisioShapepublic 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
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Starting shape.
- includeStart bool = true
- 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
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- 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
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- 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
- Page to query.
- layerName string
- Layer name or universal name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
IReadOnlyList<VisioConnector>public static IReadOnlyList<VisioConnector> ConnectorsWithHyperlink(VisioPage page, string address, StringComparison comparison = OrdinalIgnoreCase) #Returns connectors that contain a hyperlink with the provided address.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- address string
- Hyperlink address.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
IReadOnlyList<VisioConnector>public static IReadOnlyList<VisioConnector> ConnectorsWithHyperlinks(VisioPage page) #Returns connectors that contain at least one hyperlink.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
IReadOnlyList<VisioConnector>public static IReadOnlyList<VisioConnector> ConnectorsWithProtection(VisioPage page) #Returns connectors that have at least one explicit protection cell.
Parameters
- page OfficeIMO.Visio.VisioPage
- 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
- Page to query.
- predicate System.Func<OfficeIMO.Visio.VisioProtection, bool>
- Protection predicate.
Returns
IReadOnlyList<VisioConnector>public static IReadOnlyList<VisioShape> Containers(VisioPage page) #Returns shapes marked as Visio-native containers.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
IReadOnlyList<VisioShape>public static VisioPage Duplicate(VisioPage page, string? name = null) #Duplicates this page in its owner document.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to duplicate.
- name string? = null
- Optional name for the duplicate. When omitted, a unique copy name is generated.
public static VisioPage Duplicate(VisioPage page, VisioPageDuplicationOptions? options) #Duplicates this page in its owner document.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to duplicate.
- options OfficeIMO.Visio.VisioPageDuplicationOptions?
- Optional duplication settings.
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
- Page that owns the shapes.
- shapes System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- Shapes to duplicate. Nested children are copied with their selected ancestor.
- offsetX double = 0.35
- Horizontal offset for duplicated top-level shapes and page-coordinate routing points.
- offsetY double = -0.35
- Vertical offset for duplicated top-level shapes and page-coordinate routing points.
- includeInternalConnectors bool = true
- Whether connectors whose attached shapes are all duplicated should also be copied, including partial connectors.
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
- Page that owns the shapes.
- shapes System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- Shapes to duplicate. Nested children are copied with their selected ancestor.
- options OfficeIMO.Visio.VisioShapeDuplicationOptions?
- Optional duplication settings.
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
- options OfficeIMO.Visio.VisioDiagramQualityOptions? = null
- minimumSeverity OfficeIMO.Visio.VisioDiagramQualityIssueSeverity = Warning
Returns
VisioPagepublic static VisioComment? FindComment(VisioPage page, int commentId) #Finds a native Visio comment by its page-scoped identifier.
Parameters
- page OfficeIMO.Visio.VisioPage
- commentId int
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
- Page to query.
- id string
- Shape identifier.
Returns
VisioShape?public static VisioSwimlaneLane? FindSwimlaneLane(VisioPage page, string laneId) #Finds a swimlane lane by identifier.
Parameters
- page OfficeIMO.Visio.VisioPage
- laneId string
Returns
VisioSwimlaneLane?public static VisioSwimlanePhase? FindSwimlanePhase(VisioPage page, string phaseId) #Finds a swimlane phase by identifier.
Parameters
- page OfficeIMO.Visio.VisioPage
- phaseId string
Returns
VisioSwimlanePhase?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
- Page to update.
- margin double = 0.5
- Margin in inches around content.
- resizePage bool = true
- Whether to resize the page around the content.
Returns
VisioPagepublic 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
- options OfficeIMO.Visio.VisioFitToContentOptions
Returns
VisioPagepublic 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
- Page to update.
- horizontalMargin double
- Horizontal margin in inches.
- verticalMargin double
- Vertical margin in inches.
- resizePage bool = true
- Whether to resize the page around the content.
Returns
VisioPagepublic static IReadOnlyList<VisioCommentThread> GetCommentThreads(VisioPage page) #Returns deterministic root-and-reply thread projections.
Parameters
- page OfficeIMO.Visio.VisioPage
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
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape.
Returns
VisioContainerInfopublic static IReadOnlyList<VisioShape> GetContainerMembers(VisioPage page, VisioShape container) #Gets the shapes currently referenced by a Visio-native container.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- 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
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape.
Returns
VisioContainerOptionspublic 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
- Page to inspect.
- includeGroupChildren bool = false
- Whether nested group children should be included using their stored coordinates.
- includeConnectors bool = true
- Whether connector waypoints and label boxes should be included.
Returns
VisioShapeBoundspublic static VisioDataGraphicInstance GetDataGraphic(VisioPage page, VisioShape target) #Returns generated data graphics currently attached to a target shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- target OfficeIMO.Visio.VisioShape
Returns
VisioDataGraphicInstancepublic static IReadOnlyList<VisioShape> GetNestedContainers(VisioPage page, VisioShape container) #Gets direct member containers.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
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
- container OfficeIMO.Visio.VisioShape
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioSwimlaneActivityPlacement> GetSwimlaneActivities(VisioPage page) #Finds swimlane activities and their current lane/phase placement.
Parameters
- page OfficeIMO.Visio.VisioPage
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
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
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
- options OfficeIMO.Visio.VisioDiagramQualityOptions? = null
Returns
VisioDiagramQualityReportpublic static IReadOnlyList<VisioConnector> IncomingConnectors(VisioPage page, VisioShape shape) #Returns connectors that end at the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- 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
- activityId string
- laneId string
- phaseId string
- options OfficeIMO.Visio.VisioSwimlaneRelayoutOptions? = null
Returns
VisioPagepublic static IReadOnlyList<VisioConnector> OutgoingConnectors(VisioPage page, VisioShape shape) #Returns connectors that start at the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- 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
- Page to query.
- from OfficeIMO.Visio.VisioShape
- Starting shape.
- to OfficeIMO.Visio.VisioShape
- Target shape.
- includeEndpoints bool = true
- 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
- map OfficeIMO.Visio.VisioStencilMigrationMap
Returns
VisioStencilMigrationPlanpublic 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
- Page to polish.
- options OfficeIMO.Visio.VisioDiagramPolishOptions? = null
- Optional polish settings.
Returns
VisioPagepublic 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
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape to resize.
- options OfficeIMO.Visio.VisioContainerOptions? = null
- Optional margin and heading settings used for the calculated bounds.
Returns
VisioShapepublic 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
- target OfficeIMO.Visio.VisioShape
- definition OfficeIMO.Visio.VisioDataGraphic
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
- options OfficeIMO.Visio.VisioWholeDiagramRelayoutOptions? = null
Returns
VisioPagepublic 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
- options OfficeIMO.Visio.VisioSwimlaneRelayoutOptions? = null
Returns
VisioPagepublic static bool RemoveComment(VisioPage page, VisioComment comment) #Removes a native Visio comment from the page.
Parameters
- page OfficeIMO.Visio.VisioPage
- comment OfficeIMO.Visio.VisioComment
Returns
boolpublic static bool RemoveComment(VisioPage page, int commentId) #Removes a native Visio comment by its page-scoped identifier.
Parameters
- page OfficeIMO.Visio.VisioPage
- commentId int
Returns
boolpublic static int RemoveCommentsForShape(VisioPage page, string shapeId) #Removes all native Visio comments targeting a shape or connector identifier.
Parameters
- page OfficeIMO.Visio.VisioPage
- shapeId string
Returns
intpublic static int RemoveDataGraphics(VisioPage page, VisioShape target) #Removes generated data-graphic shapes for one target.
Parameters
- page OfficeIMO.Visio.VisioPage
- target OfficeIMO.Visio.VisioShape
Returns
intpublic 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
- container OfficeIMO.Visio.VisioShape
- member OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic 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
- container OfficeIMO.Visio.VisioShape
- members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic 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
- commentId int
- editedAt System.DateTimeOffset? = null
Returns
VisioCommentpublic 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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- masterNameU string
- Replacement master universal name.
- resizeToMaster bool = false
- Whether to resize the shape to the replacement master's default size.
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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- master OfficeIMO.Visio.VisioMaster
- Replacement master.
- resizeToMaster bool = false
- Whether to resize the shape to the replacement master's default size.
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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- Replacement stencil definition.
- resizeToMaster bool = false
- Whether to resize the shape to the stencil's default size.
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
- parentCommentId int
- text string
- author OfficeIMO.Visio.VisioCommentAuthor
- options OfficeIMO.Visio.VisioCommentOptions? = null
Returns
VisioCommentpublic 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
- Page owning the shape, including nested shapes.
- shape OfficeIMO.Visio.VisioShape
- Shape to resize.
- width OfficeIMO.OfficeLength
- Finite positive requested width.
- height OfficeIMO.OfficeLength
- Finite positive requested height.
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
- commentId int
- editedAt System.DateTimeOffset? = null
Returns
VisioCommentpublic 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
- Page whose connector labels should be adjusted.
- step double = 0.18
- Search step in page units, expressed in inches.
- maxAttempts int = 12
- Number of search rings to try around the current label position.
- avoidShapes bool = true
- Whether labels should avoid unrelated non-container shapes.
- avoidLabels bool = true
- Whether labels should avoid other connector labels.
- preferEndpointZones bool = false
- Whether labels should prefer common endpoint zones and avoid unrelated background zones.
- avoidConnectorPaths bool = true
- Whether labels should avoid unrelated connector paths.
- positionStep double = 0.08
- Connector path-position search step, from 0.0 to 1.0.
- maxPositionShifts int = 4
- Number of positive and negative connector path-position shifts to try.
- optimizationPasses int = 1
- Number of whole-page label optimization passes to run after the initial placement sweep.
Returns
VisioPagepublic static IReadOnlyList<VisioComment> ResolvedComments(VisioPage page) #Returns native Visio comments that are marked as done.
Parameters
- page OfficeIMO.Visio.VisioPage
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
- Page to update.
- step double = 0.25
- Search step in inches.
- maxAttempts int = 24
- Number of search rings to try around each overlapping shape.
- includeContainers bool = false
- Whether container and background surface shapes should be moved and treated as obstacles.
Returns
VisioPagepublic 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
- Page whose connectors should be rerouted.
- padding double = 0.15
- Padding added around each obstacle while testing route intersections.
- maxLanes int = 12
- Number of positive and negative routing lanes to try on each axis.
Returns
VisioPagepublic 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
- Page whose connectors should be rerouted.
- options OfficeIMO.Visio.VisioConnectorRoutingOptions
- Routing options controlling padding, lane search, and whether zones/containers count as obstacles.
Returns
VisioPagepublic 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
- path string
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeConversionReportpublic 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
- stream System.IO.Stream
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeConversionReportpublic 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
- path string
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
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
- stream System.IO.Stream
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
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
- Page to query.
- masterNameU string
- Master universal name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectByName(VisioPage page, string name, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes with a matching shape name.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- name string
- Shape name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectByNameU(VisioPage page, string nameU, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes with a matching universal shape name.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- nameU string
- Universal shape name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectCallouts(VisioPage page) #Selects shapes marked as OfficeIMO callouts or annotations.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Starting shape.
- includeStart bool = true
- Whether the starting shape should be included in the returned component.
Returns
VisioShapeSelectionpublic static VisioConnectorSelection SelectConnectedConnectors(VisioPage page, VisioShape shape) #Selects connectors that either start or end at the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Shape connected to or from.
Returns
VisioConnectorSelectionpublic static VisioConnectorSelection SelectConnectors(VisioPage page, Func<VisioConnector, bool> predicate) #Selects connectors matching a predicate for bulk editing.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- predicate System.Func<OfficeIMO.Visio.VisioConnector, bool>
- Predicate used to include connectors.
Returns
VisioConnectorSelectionpublic static VisioConnectorSelection SelectConnectorsInLayer(VisioPage page, string layerName, StringComparison comparison = OrdinalIgnoreCase) #Selects connectors assigned to a page layer.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- layerName string
- Layer name or universal name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioConnectorSelectionpublic static VisioConnectorSelection SelectConnectorsWithHyperlink(VisioPage page, string address, StringComparison comparison = OrdinalIgnoreCase) #Selects connectors that contain a hyperlink with the provided address.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- address string
- Hyperlink address.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioConnectorSelectionpublic static VisioConnectorSelection SelectConnectorsWithHyperlinks(VisioPage page) #Selects connectors that contain at least one hyperlink.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
VisioConnectorSelectionpublic static VisioConnectorSelection SelectConnectorsWithProtection(VisioPage page) #Selects connectors that have at least one explicit protection cell.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
VisioConnectorSelectionpublic static VisioConnectorSelection SelectConnectorsWithProtection(VisioPage page, Func<VisioProtection, bool> predicate) #Selects connectors whose protection state matches the predicate.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- predicate System.Func<OfficeIMO.Visio.VisioProtection, bool>
- Protection predicate.
Returns
VisioConnectorSelectionpublic static VisioShapeSelection SelectContainedIn(VisioPage page, VisioShapeBounds bounds) #Selects shapes whose bounds are fully contained by the provided bounds.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- bounds OfficeIMO.Visio.VisioShapeBounds
- Containing bounds.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- container OfficeIMO.Visio.VisioShape
- Shape whose bounds are used as the containing area.
- includeContainer bool = false
- Whether the containing shape itself should be included.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectContainers(VisioPage page) #Selects shapes marked as Visio-native containers.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectContainingText(VisioPage page, string text, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes whose text contains the provided value.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- text string
- Text fragment to find.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic static VisioConnectorSelection SelectIncomingConnectors(VisioPage page, VisioShape shape) #Selects connectors that end at the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Shape connected to.
Returns
VisioConnectorSelectionpublic static VisioShapeSelection SelectIntersecting(VisioPage page, VisioShapeBounds bounds) #Selects shapes whose bounds intersect the provided bounds.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- bounds OfficeIMO.Visio.VisioShapeBounds
- Bounds to test against.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectIntersecting(VisioPage page, VisioShape shape, bool includeSelf = false) #Selects shapes whose bounds intersect the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Shape whose bounds are used for the test.
- includeSelf bool = false
- Whether the reference shape itself should be included.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectLayer(VisioPage page, string layerName, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes assigned to a page layer.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- layerName string
- Layer name or universal name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic static VisioConnectorSelection SelectOutgoingConnectors(VisioPage page, VisioShape shape) #Selects connectors that start at the provided shape.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Shape connected from.
Returns
VisioConnectorSelectionpublic 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
- Page to query.
- from OfficeIMO.Visio.VisioShape
- Starting shape.
- to OfficeIMO.Visio.VisioShape
- Target shape.
- includeEndpoints bool = true
- Whether the starting and target shapes should be included.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectShapes(VisioPage page, Func<VisioShape, bool> predicate) #Selects shapes matching a predicate for bulk editing.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- predicate System.Func<OfficeIMO.Visio.VisioShape, bool>
- Predicate used to include shapes.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithData(VisioPage page, string key) #Selects shapes that contain the provided data key.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- key string
- Data key.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- key string
- Data key.
- value string
- Data value.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- key string
- Data key.
- predicate System.Func<string?, bool>
- Predicate that receives the current Shape Data value.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithHyperlink(VisioPage page, string address, StringComparison comparison = OrdinalIgnoreCase) #Selects shapes that contain a hyperlink with the provided address.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- address string
- Hyperlink address.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithHyperlinks(VisioPage page) #Selects shapes that contain at least one hyperlink.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithProtection(VisioPage page) #Selects shapes that have at least one explicit protection cell.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithProtection(VisioPage page, Func<VisioShapeProtection, bool> predicate) #Selects shapes whose protection state matches the predicate.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- predicate System.Func<OfficeIMO.Visio.VisioShapeProtection, bool>
- Protection predicate.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithShapeData(VisioPage page, string name) #Selects shapes that contain a Visio Shape Data row.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- name string
- Shape Data row name.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- name string
- Shape Data row name.
- value string
- Shape Data value.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- name string
- Shape Data row name.
- predicate System.Func<string?, bool>
- Predicate that receives the current Shape Data value.
Returns
VisioShapeSelectionpublic static VisioShapeSelection SelectWithUserCell(VisioPage page, string name) #Selects shapes that contain a Visio User cell.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- name string
- User cell row name.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- name string
- User cell row name.
- value string
- User cell value.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
VisioShapeSelectionpublic 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
- Page to query.
- masterNameU string
- Master universal name.
- comparison System.StringComparison = OrdinalIgnoreCase
- 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
- Page to query.
- name string
- Shape name.
- comparison System.StringComparison = OrdinalIgnoreCase
- 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
- Page to query.
- nameU string
- Universal shape name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
IReadOnlyList<VisioShape>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
- Page to query.
- bounds OfficeIMO.Visio.VisioShapeBounds
- 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
- Page to query.
- container OfficeIMO.Visio.VisioShape
- Shape whose bounds are used as the containing area.
- includeContainer bool = false
- 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
- Page to query.
- text string
- Text fragment to find.
- comparison System.StringComparison = OrdinalIgnoreCase
- 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
- Page to query.
- layerName string
- Layer name or universal name.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesIntersecting(VisioPage page, VisioShapeBounds bounds) #Returns shapes whose bounds intersect the provided bounds.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- bounds OfficeIMO.Visio.VisioShapeBounds
- 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
- Page to query.
- shape OfficeIMO.Visio.VisioShape
- Shape whose bounds are used for the test.
- includeSelf bool = false
- Whether the reference shape itself should be included.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesWithData(VisioPage page, string key) #Returns shapes that contain the provided data key.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- key string
- 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
- Page to query.
- key string
- Data key.
- value string
- Data value.
- comparison System.StringComparison = OrdinalIgnoreCase
- 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
- Page to query.
- key string
- Data key.
- predicate System.Func<string?, bool>
- Predicate that receives the current Shape Data value.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesWithHyperlink(VisioPage page, string address, StringComparison comparison = OrdinalIgnoreCase) #Returns shapes that contain a hyperlink with the provided address.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- address string
- Hyperlink address.
- comparison System.StringComparison = OrdinalIgnoreCase
- String comparison used for matching.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesWithHyperlinks(VisioPage page) #Returns shapes that contain at least one hyperlink.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesWithProtection(VisioPage page) #Returns shapes that have at least one explicit protection cell.
Parameters
- page OfficeIMO.Visio.VisioPage
- 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
- Page to query.
- predicate System.Func<OfficeIMO.Visio.VisioShapeProtection, bool>
- Protection predicate.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesWithShapeData(VisioPage page, string name) #Returns shapes that contain a Visio Shape Data row.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- name string
- 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
- Page to query.
- name string
- Shape Data row name.
- value string
- Shape Data value.
- comparison System.StringComparison = OrdinalIgnoreCase
- 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
- Page to query.
- name string
- Shape Data row name.
- predicate System.Func<string?, bool>
- Predicate that receives the current Shape Data value.
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> ShapesWithUserCell(VisioPage page, string name) #Returns shapes that contain a Visio User cell.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page to query.
- name string
- 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
- Page to query.
- name string
- User cell row name.
- value string
- User cell value.
- comparison System.StringComparison = OrdinalIgnoreCase
- 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
- options OfficeIMO.Visio.VisioDrawingOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeConversionResult<OfficeDrawing, VisioDrawingConversionReport>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
- format OfficeIMO.Drawing.OfficeImageExportFormat
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeImageExportResultpublic 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
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeImageExportResultpublic 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
- options OfficeIMO.Visio.VisioImageExportOptions?
- report OfficeIMO.OfficeConversionReport
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeImageExportResultpublic 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
- options OfficeIMO.Visio.VisioImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<OfficeImageExportResult>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
- options OfficeIMO.Visio.VisioSvgSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic 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
- options OfficeIMO.Visio.VisioSvgSaveOptions?
- report OfficeIMO.OfficeConversionReport
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic 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
- options OfficeIMO.Visio.VisioSvgSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
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
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
- commentId int
- text string
- editedAt System.DateTimeOffset? = null
Returns
VisioComment