Hello,
Recently I wrote a VB code for matching a shape with an existing shape. The code basically scans the parent shape and copies information such as width, height, angle, etc. Along with that it also copies information about the geometry section such as number of rows, row types and formulae in those rows. It then pastes this information in the child shape and make it same as the parent shape.
I came to know that if you change the row type in the geometry section, for e.g.: from "LineTo" to "ArcTo", the shape loses its master. The "Shape Name" dialog box says "<no master>".
Why is that? Why does changing geometry row disconnect the master?
- Miki
Just tried this in Visio 2010. It seems to keep the master name ok. Which version of Visio are you using?
I am using Visio 2016 on 365.
Ah, looks like yet another new "feature".
Cough.
Ahhh....dislike these new features. >:(
Thanks for looking it up Paul!
Here is my step-by-step process. The attached images corresponds to the following steps:
Step 1:
Open a Basic shapes drawing > Drag and drop a Rectangle from Basic Shapes Stencil > Check it's Shape name.
Master = Rectangle
Step 2:
Go to Shapesheet of the rectangle > Change the row type from "LineTo" to "EllipticalArcTo"
Step 3:
Check the Shape name again. Voila, "No Master".
This is seen in both Visio 2013 and Visio 2016.
- Miki.
I think that is how it should work ( at least how its worked in 2003 and beyond). because on drop from stencil, a copy is made in document stencil. In essence, it breaks connection with original stencil
Remember, any change to the dropped shape never affects the master shape in the stencil. So if not same as dropped, it has
to find a new name for it.
now that said, in 2013, it appears to just use the shape name on the sheet
(square.4 as master name in doc stencil vs square that is in the basic shapes stencil)
Just because part of the shape geometry has changed does not mean the basic essence of the shape is different.
The first geometry part (apart from the initial MoveTo) might have been a line from the left-hand over to the right-hand side. You might need to change this to become a shallow arc (up or down) depending upon some other factor.
Hmmmm. May be another feature introduced with new ribbon versions of Visio. Doesn't seem to be present in Visio 2007, see attached.
Another possibility, could be due to format change, i.e., VSD vs VSDX
Wapperdude
The weird thing is if I take the same rectangle shape and use the "pencil" tool and bend one of the edge, one of the geometry row type is changed to "EllipticalArcTo", but the master connection is not broken. The disconnect only happens if you change the row type by going into the shapesheet or using a code.
I don't see a rationale behind that.
- Miki
Since I only go as far as V2007, I can't confirm if you're experiencing the new version bug syndrome. The example I posted covers all, but the VBA case you mentioned, and no breakage experienced.
Perhaps some users with V2013 / 2016 can try and replicate the problem.
Wapperdude