Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

VisioMasterEditingExtensions

OfficeIMO.Visio

Namespace
OfficeIMO.Visio
Assembly
OfficeIMO.Visio
Source revision
273d35d5ba8a with working tree changes
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, bool resizeToMaster = false) #

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

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the shape.
shape OfficeIMO.Visio.VisioShape required
Shape to update.
masterNameU string required
Replacement master universal name.
resizeToMaster bool = false optional
Whether to resize the shape to the replacement master's default size.

Returns

VisioShape The updated shape.
public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, VisioMaster master, bool resizeToMaster = false) #

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 bool = false optional
Whether to resize the shape to the replacement master's default size.

Returns

VisioShape The updated shape.
public static VisioShape ReplaceMaster(VisioPage page, VisioShape shape, VisioStencilShape stencil, bool resizeToMaster = false) #

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 bool = false optional
Whether to resize the shape to the stencil's default size.

Returns

VisioShape The updated shape.
public static VisioShapeSelection ReplaceMaster(VisioShapeSelection selection, string masterNameU, bool resizeToMaster = false) #

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

Parameters

selection OfficeIMO.Visio.VisioShapeSelection required
Selection to update.
masterNameU string required
Replacement master universal name.
resizeToMaster bool = false optional
Whether to resize each shape to the replacement master's default size.

Returns

VisioShapeSelection The updated selection.
public static VisioShapeSelection ReplaceMaster(VisioShapeSelection selection, VisioMaster master, bool resizeToMaster = false) #

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 bool = false optional
Whether to resize each shape to the replacement master's default size.

Returns

VisioShapeSelection The updated selection.
public static VisioShapeSelection ReplaceMaster(VisioShapeSelection selection, VisioStencilShape stencil, bool resizeToMaster = false) #

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 bool = false optional
Whether to resize each shape to the stencil's default size.

Returns

VisioShapeSelection The updated selection.