Master shape sheet changes not propagating to all shapes in a .vsd

Started by jforst, February 14, 2012, 01:52:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jforst

I've made changes to the shape sheet for a shape, namely inserting a Scratch section, with formulas in A1, B1, and C1.

Then under 'Text Fields', I replaced an existing formula in Value.0, with a reference to Scratch.C1.

The Scratch section insertion and the formulas in Scratch.A1, Scratch.B1, and Scratch.C1 propagate to all the shapes based on this master.

But, the change from a formula to a cell reference in TextFields.Value0 is not propagating to any of the shapes based on this master.

I actually have two very similar shapes, (front view and rear view of a piece of rack-mount equipment) with identical Scratch and TextField, and they behave the same, i.e. the TextField.Value0 replacement of the previous formula with the cell reference is not propagating to the shapes on the drawing.

Ideas?

Jason

Paul Herber

a. you have to edit the Document Stencil master for this to work.
b. no changes to the appropriate section of the shape in the document can already have taken place i.e adding a new shape to a drawing, then editing the scratch section of that shape, then editing the scratch section of the master n the document stencil will not get propogated as the shape instance that was dropped on the page has its own scratch section independent of the master. That is how the object model works in Visio, changing the section in the dropped shape has extended the original object.
Electronic and Electrical engineering, business and software stencils for Visio -

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

vojo

Paul...are you sure about that??.....I have updated doc stencil shapes before and they took effect on only the current drawing.
(otherwise....I would have punted and went the source stencil and recreated all the work).

Paul Herber

Hi Vojo, sure about what? What bit are you referring to?
Any changes will only propagate within the current document, yes.
Electronic and Electrical engineering, business and software stencils for Visio -

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

jforst

Paul, Thanks for the reply.

I am making these changes to the shape sheet for a shape in the document stencil. Sorry if that wasn't clear.

Seems like I may be running into "b" that you describe, if I follow correctly.

But, this explanation does not seem to make sense (not that I think it may be wrong, just that I don't understand it).  Certainly one of the features/benefits of Visio since the Shapeware days has been the ability to globally (within a document) change a shape, and have those changes propagated to all of the shape instances in the document, no matter what may have happened between dropping the shape and the modification of the master. I remember you used to have to 'edit' a shape in the drawing, and acknowledge that the link to the master would be broken, that doesn't seem to hold in V2010.

Also, this behavior is not universal, e.g. I just dropped some new shapes, moved them around, edited some text in a couple, then made changes to the master for the shapes, and those changes propagated. So it seems the problem is with a couple specific shapes. And that's probably a rabbit hole not worth going down.

Jason.

Quote from: Paul Herber on February 14, 2012, 02:51:48 AM
a. you have to edit the Document Stencil master for this to work.
b. no changes to the appropriate section of the shape in the document can already have taken place i.e adding a new shape to a drawing, then editing the scratch section of that shape, then editing the scratch section of the master n the document stencil will not get propogated as the shape instance that was dropped on the page has its own scratch section independent of the master. That is how the object model works in Visio, changing the section in the dropped shape has extended the original object.

Paul Herber

This is a simplified version of how Visio may do things (just my understanding of how data objects work):
When a shape is copied from a stencil onto the drawing page firstly a copy is made to the document stencil. This is the master shape.
Now an instance of the master shape is created on the document page. The instance on the drawing page consists of a back-reference to the master and a data structure of shape cells. Now, at this point almost all cells refer back to the master shape, some that obviously won't are the PinX and PinY. At this point any change made to the master shape will be propagated to the shape instances on the drawing page.
So, if we now edit the master shape in the document stencil, say we change the shape's LocPinX, this change will be propagated to all the instances. Now drop several of the shape onto the page, with one of these shapes change that shapes LocPinX. That shape's LocPinX has been overriden and Visio's internal data structure will note this and this shape's instance will now contain 3 overridden items. Now change the master shape again, set another value in the master LocPinX, the new value will be propagated to the shape instances except the one where the value has been overridden.
This applies also to whole sections, if a section is added to the master shape then that change gets propagated to all instances. If a new section is added to an instance then that instance  has overidden the master and any change/addition of that section in the master will have no effect on that instance.
I hope that makes some sense.
Electronic and Electrical engineering, business and software stencils for Visio -

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

vojo

I dont think it works quite like that

1. drop a shape from some master stencil  ...shape called mymaster.1
     - it is place on drawing
     - instance of master shape is placed in document stencil....mymaster.1
2.  change the master shape IN document stencil
     - Affects all shape instances in the CURRENT drawing
     - It does not affect the master shape in some stencil or in any other drawing
3.  drop the same master shape from the other master stencil...shape still called mymaster.1
     - it is placed on page of drawing
     - a NEW instance is created in the document stencil  (now have 2 of them.....   a mymaster.1 and a mymaster.2) since its different than doc stencil mymaster.1
4. change mymaster.2 in the document stencil
     - only changes the second shape dropped from the other stencil....not the first shape dropped from that stencil
     - mymaster.1 in some other stencil is unaffected
5. change mmymaster.1 in the document stencil
     - only changes the first dropped shape...not the second
     - mymaster.1 in some other stencil is UNAFFECTED

As a result, you can have 10000 shapes on the page AND 10000 mymasters in the doc stencil
(mymaster.1.....thru.....mymaster.999999 in the document stencil if you chose to drop, change drop, change 10,000 times even though all started from mymaster.1)

This is the reason why there is some grousing about changing a shape in a stencil (doc or otherwise) not propogating through all drawings ever done (when opened again).
I.e. it make s shape mgmt more difficult since now will have 29 billion versions of the master shape propogating thru 492 Yocta drawings done over 5 years.

At least that is how it works when I end up doing these kinds of things.

Paul Herber

Well, yes, at step 3, having altered the original master, you now reintroduce the unaltered master, there is no other opton but to create a new master in the document stencil.
Electronic and Electrical engineering, business and software stencils for Visio -

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

abssorb

Just a suggestion. I'm not an expert but I've seen scratch functionality exhibit some frustrating bugs in this respect, so if it works on other shapes but for some unfathomable reason isn't working on others - maybe try using user defined cells instead of the scratch section.