VisioDuplicationExtensions
OfficeIMO.Visio
Editing helpers for duplicating Visio content while keeping copied shapes independent.
Inheritance
- object
- VisioDuplicationExtensions
Methods
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 Duplicate(VisioShapeSelection selection, double offsetX = 0.35, double offsetY = -0.35, bool includeInternalConnectors = true) #Duplicates a page-backed selection on the same page.
Parameters
- selection OfficeIMO.Visio.VisioShapeSelection
- Selection to duplicate.
- 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 Duplicate(VisioShapeSelection selection, VisioShapeDuplicationOptions? options) #Duplicates a page-backed selection on the same page.
Parameters
- selection OfficeIMO.Visio.VisioShapeSelection
- Selection to duplicate.
- options OfficeIMO.Visio.VisioShapeDuplicationOptions?
- Optional duplication settings.
public static VisioPage DuplicatePage(VisioDocument document, VisioPage sourcePage, string? name = null) #Duplicates a page in the same document, preserving page settings, layers, shapes, and internal connectors.
Parameters
- document OfficeIMO.Visio.VisioDocument
- Document that owns the source page and receives the duplicate.
- sourcePage 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 DuplicatePage(VisioDocument document, VisioPage sourcePage, VisioPageDuplicationOptions? options) #Duplicates a page in the same document, preserving page settings, layers, shapes, and internal connectors.
Parameters
- document OfficeIMO.Visio.VisioDocument
- Document that owns the source page and receives the duplicate.
- sourcePage 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.