Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Miki on February 14, 2018, 03:03:45 PM

Title: No master after changing Geometry row type of a shape
Post by: Miki on February 14, 2018, 03:03:45 PM
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
Title: Re: No master after changing Geometry row type of a shape
Post by: Paul Herber on February 14, 2018, 04:45:44 PM
Just tried this in Visio 2010. It seems to keep the master name ok. Which version of Visio are you using?
Title: Re: No master after changing Geometry row type of a shape
Post by: Miki on February 14, 2018, 04:50:56 PM
I am using Visio 2016 on 365.
Title: Re: No master after changing Geometry row type of a shape
Post by: Paul Herber on February 14, 2018, 04:54:38 PM
Ah, looks like yet another new "feature".
Cough.
Title: Re: No master after changing Geometry row type of a shape
Post by: Miki on February 14, 2018, 07:01:09 PM
Ahhh....dislike these new features. >:(
Thanks for looking it up Paul!
Title: Re: No master after changing Geometry row type of a shape
Post by: Miki on February 14, 2018, 07:58:50 PM
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.
Title: Re: No master after changing Geometry row type of a shape
Post by: vojo on February 14, 2018, 10:48:59 PM
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)
Title: Re: No master after changing Geometry row type of a shape
Post by: Paul Herber on February 15, 2018, 04:16:33 PM
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.
Title: Re: No master after changing Geometry row type of a shape
Post by: wapperdude on February 15, 2018, 05:16:48 PM
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
Title: Re: No master after changing Geometry row type of a shape
Post by: Miki on February 16, 2018, 10:28:16 PM
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
Title: Re: No master after changing Geometry row type of a shape
Post by: wapperdude on February 17, 2018, 04:43:26 AM
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