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 4 overloads
public static VisioPage Duplicate(VisioPage page, String name = null) #
Returns: VisioPage

Duplicates this page in its owner document.

Parameters

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

Returns

The duplicated page.

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.
options OfficeIMO.Visio.VisioPageDuplicationOptions requiredposition: 1
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.

public static VisioShapeSelection Duplicate(VisioShapeSelection selection, VisioShapeDuplicationOptions options) #
Returns: VisioShapeSelection

Duplicates a page-backed selection on the same page.

Parameters

selection OfficeIMO.Visio.VisioShapeSelection requiredposition: 0
Selection to duplicate.
options OfficeIMO.Visio.VisioShapeDuplicationOptions requiredposition: 1
Optional duplication settings.

Returns

A selection containing the duplicated root shapes.

DuplicatePage 2 overloads
public static VisioPage DuplicatePage(VisioDocument document, VisioPage sourcePage, String name = null) #
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 optionalposition: 2
Optional name for the duplicate. When omitted, a unique copy name is generated.

Returns

The duplicated page.

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.
options OfficeIMO.Visio.VisioPageDuplicationOptions requiredposition: 2
Optional duplication settings.

Returns

The duplicated page.

DuplicateShapes 2 overloads
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.

public static VisioShapeSelection DuplicateShapes(VisioPage page, IEnumerable<VisioShape> shapes, VisioShapeDuplicationOptions options) #
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.
options OfficeIMO.Visio.VisioShapeDuplicationOptions requiredposition: 2
Optional duplication settings.

Returns

A selection containing the duplicated root shapes.