API Reference

Class

VisioMasterEditingExtensions

Namespace OfficeIMO.Visio
Assembly OfficeIMO.Visio
Modifiers static

Editing helpers for changing the master used by existing Visio shapes.

Inheritance

  • Object
  • VisioMasterEditingExtensions

Methods

ReplaceMaster 6 overloads
public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, VisioStencilShape stencil, Boolean resizeToMaster = false) #
Returns: VisioShape

Replaces a shape's master by universal master name while preserving its position, text, style, data, and connectors.

Parameters

page OfficeIMO.Visio.VisioPage requiredposition: 0
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape requiredposition: 1
Shape to update.
masterNameU System.String requiredposition: 2
Replacement master universal name.
resizeToMaster System.Boolean = false optionalposition: 3
Whether to resize the shape to the replacement master's default size.

Returns

The updated shape.

ReplaceMaster(OfficeIMO.Visio.VisioPage page, OfficeIMO.Visio.VisioShape shape, OfficeIMO.Visio.VisioMaster master, System.Boolean resizeToMaster) #

Replaces a shape's master using an existing master instance.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape required
Shape to update.
master OfficeIMO.Visio.VisioMaster required
Replacement master.
resizeToMaster System.Boolean required
Whether to resize the shape to the replacement master's default size.

Returns

The updated shape.

ReplaceMaster(OfficeIMO.Visio.VisioPage page, OfficeIMO.Visio.VisioShape shape, OfficeIMO.Visio.Stencils.VisioStencilShape stencil, System.Boolean resizeToMaster) #

Replaces a shape's master using an OfficeIMO-native stencil definition.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape required
Shape to update.
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
Replacement stencil definition.
resizeToMaster System.Boolean required
Whether to resize the shape to the stencil's default size.

Returns

The updated shape.

public static VisioShapeSelection ReplaceMaster(VisioShapeSelection selection, VisioStencilShape stencil, Boolean resizeToMaster = false) #
Returns: VisioShapeSelection

Replaces the master for every shape in a page-backed selection.

Parameters

selection OfficeIMO.Visio.VisioShapeSelection requiredposition: 0
Selection to update.
masterNameU System.String requiredposition: 1
Replacement master universal name.
resizeToMaster System.Boolean = false optionalposition: 2
Whether to resize each shape to the replacement master's default size.

Returns

The updated selection.

ReplaceMaster(OfficeIMO.Visio.VisioShapeSelection selection, OfficeIMO.Visio.VisioMaster master, System.Boolean resizeToMaster) #

Replaces the master for every shape in a page-backed selection using an existing master instance.

Parameters

selection OfficeIMO.Visio.VisioShapeSelection required
Selection to update.
master OfficeIMO.Visio.VisioMaster required
Replacement master.
resizeToMaster System.Boolean required
Whether to resize each shape to the replacement master's default size.

Returns

The updated selection.

ReplaceMaster(OfficeIMO.Visio.VisioShapeSelection selection, OfficeIMO.Visio.Stencils.VisioStencilShape stencil, System.Boolean resizeToMaster) #

Replaces the master for every shape in a page-backed selection using an OfficeIMO-native stencil definition.

Parameters

selection OfficeIMO.Visio.VisioShapeSelection required
Selection to update.
stencil OfficeIMO.Visio.Stencils.VisioStencilShape required
Replacement stencil definition.
resizeToMaster System.Boolean required
Whether to resize each shape to the stencil's default size.

Returns

The updated selection.