News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Swap Master? I.e. make an existing shape relate to a different master

Started by abssorb, April 18, 2012, 09:56:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

abssorb

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

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

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 for Visio -

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

abssorb


abssorb

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

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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 243 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1115KB.
Tokens: post-login.
Cache hits: 15: 0.00934s for 26,741 bytes (show)
Cache misses: 5: (show)
Queries used: 17.

[Show Queries]