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, String masterNameU, 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.

public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, VisioMaster master, Boolean resizeToMaster = false) #
Returns: VisioShape

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

Parameters

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

Returns

The updated shape.

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

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

Parameters

page OfficeIMO.Visio.VisioPage requiredposition: 0
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape requiredposition: 1
Shape to update.
stencil OfficeIMO.Visio.Stencils.VisioStencilShape requiredposition: 2
Replacement stencil definition.
resizeToMaster System.Boolean = false optionalposition: 3
Whether to resize the shape to the stencil's default size.

Returns

The updated shape.

public static VisioShapeSelection ReplaceMaster(VisioShapeSelection selection, String masterNameU, 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.

public static VisioShapeSelection ReplaceMaster(VisioShapeSelection selection, VisioMaster master, Boolean resizeToMaster = false) #
Returns: VisioShapeSelection

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

Parameters

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

Returns

The updated selection.

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

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

Parameters

selection OfficeIMO.Visio.VisioShapeSelection requiredposition: 0
Selection to update.
stencil OfficeIMO.Visio.Stencils.VisioStencilShape requiredposition: 1
Replacement stencil definition.
resizeToMaster System.Boolean = false optionalposition: 2
Whether to resize each shape to the stencil's default size.

Returns

The updated selection.