Author Topic: Swap Master? I.e. make an existing shape relate to a different master  (Read 5597 times)

0 Members and 1 Guest are viewing this topic.

abssorb

  • Jr. Member
  • **
  • Posts: 43
I have a template / set of shapes which I authored and has been in circulation for over a year in our organisation.  It's widely used and many users have hundreds of shapes on their diagrams.

The shapes were provided for use from the document stencil.  Over time, new versions of the template and its shapes have been released.  The changes to the shapes are meta-data and other shapesheet functions.

A problem arises now and again, where a user will have a fresh template,  with fresh shapes newly created for about 50% of the diagram, but the other 50% of shapes are from older versions of the template.

This results is a diagram which looks as it should, but has duplicate masters. 

E.g.

Master 'Milestone Diamond' has 50 shapes on a page, and 'Milestone Diamond.51' has another 50.  I'd like to eliminate 'Milestone Diamond.51' without having to create 50 new shapes from the desired master.

Is there any way I can change a shape to point to the desired master?

Fin311

  • Jr. Member
  • **
  • Posts: 15
Re: Swap Master? I.e. make an existing shape relate to a different master
« Reply #1 on: April 18, 2012, 06:43:14 AM »
The quickest way to do that would be to edit the master shape in the document stencil.  Copy the new shape to the clipboard and paste it in the edit master shape window.  Delete your original shape Milestone Diamond.51 and rename the shape you just copied to 'Milestone Diamond.51' (Developer Tap>Shape Name).  This will replace your original and save you from entering extra data in the shapesheet.  Close the edit master shape window, then click yes to update all occurances on the page.  Be sure to try this on a test document first, this method could alter any custom shape data values entered by your users.  Hope this helps.

Fin

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Swap Master? I.e. make an existing shape relate to a different master
« Reply #2 on: April 18, 2012, 03:28:26 PM »
I have a utility that might be able to help you with this, it can do shape substitition:
http://www.sandrila.co.uk/visio-utilities/
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

abssorb

  • Jr. Member
  • **
  • Posts: 43
Re: Swap Master? I.e. make an existing shape relate to a different master
« Reply #3 on: April 25, 2012, 05:20:08 AM »
Thanks Guys, I'll check those out and feed back.

abssorb

  • Jr. Member
  • **
  • Posts: 43
Fin - unfortunately I couldnt get a result with your suggestion.  Both shapes already exist so not creating a new shape.   If 'Milestone Diamond' = shape A and 'Milestone Diamond.51'= shape B,  I want to change all shapes B to have a relationship with shape A master, instead of shape B master.


Paul, the app looked promising - thanks, but IT won't install anything that's not corporately approved.  Back to the drawing board?  ;)

AndyW

  • Sr. Member
  • ****
  • Posts: 326
    • PC Mimic Diagram
You need to write some code in that case, I've done this for my Visio app and can update any of my diagrams to the latest version in the stencil. However, it is fairly specific to the shapes being used and connections between shapes. If all youe data is in the custom properties it would be reasonably straightforward top copy this across.

For each page
    For each shape on the page
        Get the name of the master shape used
        Locate the master in the stencil
        Drop the new master in the same position as the shape to be replaced.
        Copy all the required data from the old shape into the new shape, also handle any connections to/from the shape
        Delete the old shape
Live life with an open mind