API Reference
Class
VisioMasterEditingExtensions
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:
VisioShapeReplaces a shape's master by universal master name while preserving its position, text, style, data, and connectors.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- masterNameU System.String
- Replacement master universal name.
- resizeToMaster System.Boolean = false
- 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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- master OfficeIMO.Visio.VisioMaster
- Replacement master.
- resizeToMaster System.Boolean
- 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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- Replacement stencil definition.
- resizeToMaster System.Boolean
- 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:
VisioShapeSelectionReplaces the master for every shape in a page-backed selection.
Parameters
- selection OfficeIMO.Visio.VisioShapeSelection
- Selection to update.
- masterNameU System.String
- Replacement master universal name.
- resizeToMaster System.Boolean = false
- 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
- Selection to update.
- master OfficeIMO.Visio.VisioMaster
- Replacement master.
- resizeToMaster System.Boolean
- 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
- Selection to update.
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- Replacement stencil definition.
- resizeToMaster System.Boolean
- Whether to resize each shape to the stencil's default size.
Returns
The updated selection.