Master Shapes

Started by Toaster, May 18, 2009, 06:02:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Toaster

I am using Visio 2003, so this may already be fixed.  I am finding the implementation of master shapes could be a lot more useful if updating the master would update all instances of the master in the project.  I assume this was the original intention, so I am crossing my fingers that it is already implemented somewhere.   :)

vojo

the problem is that when you drop a master shape on a sheet, it is copied to document stencil.
So, if an update is changed to all instances throughout all drawings, then visio has to do some
serious heavy lifting (walk through all files, figure out whether you really wanted older drawings to change, etc).

Personally, I place a version number in the master shape name so I know whether latest is used.

if a version name were incorporated in visio (not just user renaming shape) and visio applied the updates to ONLY the open file and upon opening a new file, asking if you want shapes updated....that might be more manageable.

Could even go down the path of any change to a master shape forces a copy of the master shape in given stencil and update all shapes in current open file to copy.   This could lead to a dialogue on any files opened later to show shapes that have "evolved" and let user check which should be updated vs left as is using the older master.

Either of these may not be too bad for visio 2019 ;-)

Visio Guy

Hi Toaster,

What exactly do you mean by "in the project"?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Toaster

#3
Thanks for you interest in this post. Glad to hear that there is a way forward for visio 2019 ;-)

By "in the project" I mean "in the same visio drawing file". 

In thinking about how to better articulate the feature, the request is essentially for the ability to subclass shapes such that the properties of the subclass are passed on to the instances in a given drawing.  (I think Flash has a similar feature.) Perhaps the UI paradigm could be based on the introduction of a new type of stencil, which behaves like a style sheet (ala word).

Paul Herber

I think what you want is already available, open the document stencil (menu File -> Shapes -> Document Stencil) and edit the master there. When you have finished editing the shape you will be asked if you want to update the shapes already in the document.
(except, of course, for those properties that have already been changed from the master's in each instance.)

Electronic and Electrical engineering, business and software stencils for Visio -

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

Toaster

I installed Visio 2007 trial and worked with the Master Shapes a bit more. I can create a new stencil, populate it with master shapes, make persistent changes to the master shape; but I can't get Visio to propagate changes from the master to the instances in the vsd.  Perhaps it matters how the master shape is created?  I am creating a custom stencil and using two methods to create a master shape - 1. the "new master" command and 2. dragging shapes from a page to the custom stencil. 

wapperdude

That won't propagate to the existing shapes on a drawing.  The 1st time a shape is dragged to a drawing page, Visio makes a "local" copy of it, in the document stencil.  Then, subsequent drag n' drops from the main stencil will actually invoke placement of the "copy" from the document stencil.  Updating the master stencil does not automatically update these "copies".  At least, not to my knowledge and experience.  You either have to edit the document stencil copies, or give your master a slightly new name so Visio thinks it'll be a new, 1st time placement.  Actually, that's a good practice as it allows you to go back to a previous version.  Updating master shapes, especially if they're shared, is always problematical as the update may (can) propagate into older drawings and change those drawings in an undesirable way.

To update your drawing, you must update the document stencil.  There may be multiple copies here.  The original from the master stencil, and then if a shape on a drawing page was copied and placed, an incremented version is added to the document stencil.  So, you might find shape, shape.10, shape.21.  All three basically the same shape.  Fun! 

HTH
Wapperdude
Visio 2019 Pro

Toaster

Thanks for the detailed explanation; I had to read it twice  :)  but it also made sense of what I saw when I was writing a Visio automation.

Consequently, I had an aha moment and took a second look at Paul's comment, and in fact the Document Stencil solves the organization problem I was wrangling.  It's a great feature.  I might be one of the few who didn't realized it was implemented, but it's a really powerful feature and might be worth drawing more attention to in the UI.

Thanks again.

Yacine

#8
I am facing exactly the same problem, namely the lack of dynamic actualisation.
For people working with modern CAD software, it is just obvious, that if you modify a nested original "object", that the modifications are transmitted to all the files using that "object".

I am in the situation that I want my designers to update their P&IDs as they update their SAP Bill Of Materials - BOMs. The problem is that the P&ID shows the whole machine and not the SAP hierarchy.

I am thinking of loading recusively visio files / replace the existing groups / ...

The idea is not yet ripe ...
Yacine

Nikolay

#9
Quote from: Yacine on June 03, 2010, 09:07:42 PM
I am facing exactly the same problem, namely the lack of dynamic actualisation.
For people working with modern CAD software, it is just obvious, that if you modify a nested original "object", that the modifications are transmitted to all the files using that "object".

I am in the situation that I want my designers to update their P&IDs as they update their SAP Bill Of Materials - BOMs. The problem is that the P&ID shows the whole machine and not the SAP hierarchy.

I am thinking of loading recusively visio files / replace the existing groups / ...

The idea is not yet ripe ...

Maybe you could take a look at the Paul's "Replace Shape" implementation (in Visio Super Utilities).

Maybe you could also take a look at our implementation (P4B) - it has an "update master instances on all my diagrams that use the stencil" function. Thought it might be kind of buried six feet under a heap of BPM stuff (e.g. it can't be used without p4b database)

The problems to be solved while implementing this "update mastershape" function are processing the sub-shapes ("updating" shapes that were put into groups), preserving connectors (i.e. bindings to connection point/whole shape), and z-order.. For example, consider you "edited" mastershape like this (cool, huh?).


Anyways, today, the "diagram update wizard" can more or less do the following:



You can select (some) shape-specific data to be preserved when updating masters
(in case shape was already "formatted" on diagram somehow):



You can select diagrams to process:



If this looks useful then maybe we'll extract this function as a standalone self-sufficient (free?) add-in  ;)

Yacine

#10
Nikolay,
I am very impressed and apreciate your offer. Thank you.
However, I am somehow looking for a more automatic and easier solution (can't rely on my users). I agree with you that the replacement of objects imply a lot of considerations.

I investigated this morning the possibility to work with nested OLE objects. It does not look that bad as you can see from the attachment.
Some observations:
- I won't be able to run reports. So I thought to nest partial reports in the objects. Will see if this is viable.
- Several crashes showed that there are limitations. But I did not found out yet if it was the number of objects or the nesting depth that caused them.
- I need to make sure to have the same scaling in all my objects
- I can't glue any connector to the shapes in the nested object. The user needs to set manually connection points.
- Entities belonging physically to the group, but not to the hierarchy can be superposed to the nested object. They will get their own reports.
- This solution could allow me to realise a kind of P&ID configuration.
Yacine

Yacine

Just saw one of the guests reading this topic of the same tenor.
http://visguy.com/vgforum/index.php?topic=906.0
Yacine

Nikolay

Quote from: Yacine on June 04, 2010, 09:52:17 AM
Just saw one of the guests reading this topic of the same tenor.
http://visguy.com/vgforum/index.php?topic=906.0

Yep, that's what I meant by "Paul's Visio Super Utilities" ;)

As for the your previous post, it seems I didn't quite get what you mean.. This might sound stupid, but can't you just use "data-bound" shapes to "fill in" the sheets? I mean, it seems that you need to update only text (BOM) fields... no? So maybe something like filling the "bill of materials" shapes from a common(shared) external source (e.g. an excel file) will do?

Yacine

#13
No, we have standard machines that we need to tailor to almost every order.
First there are the electrical data that change. That's only a matter of data.
Secondly there are many options and variants in the standard machine itself. That's where I need configuration (replacement of groups or enhancements)
Third there are project specific requirements. They imply sometimes superficial and sometimes deep changes in the process. Here, we need manual work and configuration at shape leve.

The difficulties that we encounter is that our P&IDs include some 300+ elements. As they are so big, they get hard to maintain and for each new project, you will not only need to add your modifications, but also check all the standard stuff that you would actually be supposed to rely on.

Splitting the P&ID in modules would allow the designer to maintain smaller groups. Each change in the standard BOMs could be easily reflected in the partial P&ID group.
Yacine