Class
VisioMasterEditingExtensions
OfficeIMO.Visio
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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- masterNameU string
- Replacement master universal name.
- resizeToMaster bool = false
- Whether to resize the shape to the replacement master's default size.
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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- master OfficeIMO.Visio.VisioMaster
- Replacement master.
- resizeToMaster bool = false
- Whether to resize the shape to the replacement master's default size.
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
- Page that owns the shape.
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- Replacement stencil definition.
- resizeToMaster bool = false
- Whether to resize the shape to the stencil's default size.
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
- Selection to update.
- masterNameU string
- Replacement master universal name.
- resizeToMaster bool = false
- Whether to resize each shape to the replacement master's default size.
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
- Selection to update.
- master OfficeIMO.Visio.VisioMaster
- Replacement master.
- resizeToMaster bool = false
- Whether to resize each shape to the replacement master's default size.
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
- Selection to update.
- stencil OfficeIMO.Visio.Stencils.VisioStencilShape
- Replacement stencil definition.
- resizeToMaster bool = false
- Whether to resize each shape to the stencil's default size.