Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

VisioDuplicationExtensions

OfficeIMO.Visio

Namespace
OfficeIMO.Visio
Assembly
OfficeIMO.Visio
Source revision
c47203b3ce89 with working tree changes
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) #

Duplicates this page in its owner document.

Parameters

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

Returns

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

Duplicates this page in its owner document.

Parameters

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

Returns

VisioPage The duplicated page.
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 required
Selection to duplicate.
offsetX double = 0.35 optional
Horizontal offset for duplicated top-level shapes and page-coordinate routing points.
offsetY double = -0.35 optional
Vertical offset for duplicated top-level shapes and page-coordinate routing points.
includeInternalConnectors bool = true optional
Whether connectors whose attached shapes are all duplicated should also be copied, including partial connectors.

Returns

VisioShapeSelection A selection containing the duplicated root shapes.
public static VisioShapeSelection Duplicate(VisioShapeSelection selection, VisioShapeDuplicationOptions? options) #

Duplicates a page-backed selection on the same page.

Parameters

selection OfficeIMO.Visio.VisioShapeSelection required
Selection to duplicate.
options OfficeIMO.Visio.VisioShapeDuplicationOptions? required
Optional duplication settings.

Returns

VisioShapeSelection A selection containing the duplicated root shapes.
DuplicatePage 2 overloads
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 required
Document that owns the source page and receives the duplicate.
sourcePage OfficeIMO.Visio.VisioPage required
Page to duplicate.
name string? = null optional
Optional name for the duplicate. When omitted, a unique copy name is generated.

Returns

VisioPage The duplicated page.
public static VisioPage 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 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

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

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

Parameters

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

Returns

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

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

Parameters

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

Returns

VisioShapeSelection A selection containing the duplicated root shapes.