API Reference

Class

VisioDuplicationExtensions

Namespace OfficeIMO.Visio
Assembly OfficeIMO.Visio
Modifiers static

Editing helpers for duplicating Visio content while keeping copied shapes independent.

Inheritance

  • Object
  • VisioDuplicationExtensions

Methods

Duplicate 3 overloads
public static VisioPage Duplicate(VisioPage page, VisioPageDuplicationOptions options) #
Returns: VisioPage

Duplicates this page in its owner document.

Parameters

page OfficeIMO.Visio.VisioPage requiredposition: 0
Page to duplicate.
name System.String = null requiredposition: 1
Optional name for the duplicate. When omitted, a unique copy name is generated.

Returns

The duplicated page.

Duplicate(OfficeIMO.Visio.VisioPage page, OfficeIMO.Visio.VisioPageDuplicationOptions options) #

Duplicates this page in its owner document.

Parameters

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

Returns

The duplicated page.

public static VisioShapeSelection Duplicate(VisioShapeSelection selection, Double offsetX = 0.35, Double offsetY = -0.35, Boolean includeInternalConnectors = true) #
Returns: VisioShapeSelection

Duplicates a page-backed selection on the same page.

Parameters

selection OfficeIMO.Visio.VisioShapeSelection requiredposition: 0
Selection to duplicate.
offsetX System.Double = 0.35 optionalposition: 1
Horizontal offset for duplicated top-level shapes and page-coordinate routing points.
offsetY System.Double = -0.35 optionalposition: 2
Vertical offset for duplicated top-level shapes and page-coordinate routing points.
includeInternalConnectors System.Boolean = true optionalposition: 3
Whether connectors between duplicated shapes should also be copied.

Returns

A selection containing the duplicated root shapes.

DuplicatePage 2 overloads
public static VisioPage DuplicatePage(VisioDocument document, VisioPage sourcePage, VisioPageDuplicationOptions options) #
Returns: VisioPage

Duplicates a page in the same document, preserving page settings, layers, shapes, and internal connectors.

Parameters

document OfficeIMO.Visio.VisioDocument requiredposition: 0
Document that owns the source page and receives the duplicate.
sourcePage OfficeIMO.Visio.VisioPage requiredposition: 1
Page to duplicate.
name System.String = null requiredposition: 2
Optional name for the duplicate. When omitted, a unique copy name is generated.

Returns

The duplicated page.

DuplicatePage(OfficeIMO.Visio.VisioDocument document, OfficeIMO.Visio.VisioPage sourcePage, OfficeIMO.Visio.VisioPageDuplicationOptions options) #

Duplicates a page in the same document, preserving page settings, layers, shapes, and internal connectors.

Parameters

document OfficeIMO.Visio.VisioDocument required
Document that owns the source page and receives the duplicate.
sourcePage OfficeIMO.Visio.VisioPage required
Page to duplicate.
options OfficeIMO.Visio.VisioPageDuplicationOptions required
Optional duplication settings.

Returns

The duplicated page.

public static VisioShapeSelection DuplicateShapes(VisioPage page, IEnumerable<VisioShape> shapes, Double offsetX = 0.35, Double offsetY = -0.35, Boolean includeInternalConnectors = true) #
Returns: VisioShapeSelection

Duplicates shapes on the same page and optionally copies connectors whose endpoints are both duplicated.

Parameters

page OfficeIMO.Visio.VisioPage requiredposition: 0
Page that owns the shapes.
shapes System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape} requiredposition: 1
Shapes to duplicate. Nested children are copied with their selected ancestor.
offsetX System.Double = 0.35 optionalposition: 2
Horizontal offset for duplicated top-level shapes and page-coordinate routing points.
offsetY System.Double = -0.35 optionalposition: 3
Vertical offset for duplicated top-level shapes and page-coordinate routing points.
includeInternalConnectors System.Boolean = true optionalposition: 4
Whether connectors between duplicated shapes should also be copied.

Returns

A selection containing the duplicated root shapes.