Change a shape to a differnt one (i.e. change the master used)

Started by lizat, July 03, 2020, 02:13:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lizat

Is it possible to have a shape and then apply a different master? I realise that it may mean a loss or addition of some attributes. I want to do two versions of the same diagram one using 'formal' shapes and one using 'hand-drawn' shapes and see how my users respond. I want to use an existing diagram as they will be familiar with it. So in this case the cahnge of shape is to another one that is very similar e.g. change a rectangle to a hand-drawn rectangle.

Is there any way to do this easily?

Thank you

Visisthebest

"In Visio, you can replace any existing shape with an entirely different shape and yet retain all of the original shape's key characteristics—position, connections, formatting, shape text, and shape data."

How? You can read here:

https://support.microsoft.com/en-us/office/replace-one-shape-with-another-176a89ea-9638-4d35-b04b-6eddd0850016

Hope this helps :).
Visio 2021 Professional

lizat

I thought I remembered that i could but couldn't see for looking. thank you!!!

vojo

I think you can change the format of a shape in the document stencil ==>  that will effect all shapes in THIS drawing
(colors, geometries, etc)

but I don't think you can actually change the shape to another

Yacine

Yacine

wapperdude

Little late to the party...
Here's code to implement the technique that Vojo identified.

It assumes that the stencil containing the handdrawn shape is part of the document.  In this case, WkyShps.vssx stencil.


Sub ChgMaster()    'Wapperdude
    Dim vShp As Visio.Shape

    For Each vShp In ActivePage.Shapes
        If (vShp.Master Is Nothing) Then
            Debug.Print "This shape has no master"
        Else
            Debug.Print vShp.Master.Name                           'print list of existing masters
            If vShp.Master.Name = "Ellipse" Then
                vShp.ReplaceShape Application.Documents.Item("WkyShps.vssx").Masters.ItemU("WCir")
            End If
        End If
    Next
    Debug.Print ""          'print revised list of masters   
    For Each vShp In ActivePage.Shapes
        Debug.Print vShp.Master.Name 
    Next
End Sub
Visio 2019 Pro

vojo

is there any need to establish the nexus between all the shapes dropped and this replaced master shape in document stenci?
do I even care?
if I copy paste a dropped shape, is a new (old) master shape added to doc stencil?