Hello,
This is my first time posting on any Visio forum so I apologize for not using the proper terminology.
I'm using a stencil developed by someone else and I am trying to resolve an annoying issue. I've attached supporting files that should be descriptive enough that you don't need to read EVERYTHING below, but I've been detailed just in case.
The stencil is for data flow diagrams and the shape in question is a data flow shape, an arc-shaped line with an arrow and a descriptive label. The arc is comprised of two end points and two control handles. One control handle adjusts the arc shape (Control1), and the other control handle adjusts the label position independently (Control2). (Control1 and Control2 are arbitrarily assigned for this post only, not official variables)
Upon initial placement and population of the label, any action upon the line results in the label and the line moving relative to each other, and this is how we want it to be. Adjusting Control1 results in the label mirroring the position of that control handle, the same relative distance and position. Increasing the height of the arc increases the height of the label, for example. Similarly, adjusting the endpoints either by angle or by width results in the label moving relatively
However, this label can get decoupled and forever cease to move relatively anymore. This happens by changing Control2, that is repositioning the label independently. Once this occurs, it no longer moves relatively with Control1. It DOES still move with the endpoints though. So if I've lifted the label an inch above the arc, and then rotate using the endpoints, the label also rotates, maintaining horizontal orientation, but staying the same distance from the line. But if I change the Control1 position, say change it from arcing upward to a steep downward arc, the label will remain where it was last dragged, and can never be recoupled again. You just have to keep repositioning the label as you make adjustments, or delete the shape and drag from the stencil again.
I have attached sample files to demonstrate this, a .vss file and a .vsd file.
The cause identified, but solution unknown
Looking at the ShapeSheet, I have identified technically what has gone wrong, but I do not know how to fix it, as this is the first time I've attempted such an adjustment (I'm used to Excel Visual Basic, this is a whole different paradigm!)
When originally placed, the Controls section of the ShapeSheet contains two items, Controls.Row_1 and Controls.Row_1, which correspond to Line Arc Position, or Control1, and Label Position, or Control2. By default, Controls.Row_2 column X and Y are populated with formulas, "Controls.Row_1" (aka align the centers), and "Controls.Row_1.Y+0.1875" (aka position the label 3/16ths of an inch above the line). So when Control1 is moved up and down, these fields don't change, and that's why it works.
But when Control2 is moved, the formula-driven values go away and are replaced with actual, descriptive values, such as X=Width*.95 and Y=.5313 in, so there's no longer that relative, formula-based attachment to Control1. The reason it stays relative with the endpoints is, I THINK, due to the Text Transform section, TxtPinX/Y and TxtLocPinX/Y, which both have formulas in them (Controls.Row_2, Controls.Row_2.Y, TxtWidth*0.5, and TxtHeight*0.5).
So! What do I do to keep from decoupling Control2 from my Control1 movements when I want to make positional adjustments?
The attached VSD shows each stage, with 1a-1c demonstrating movement without changing the position of Control2, and 2a-2d demonstrating movement WITH changing position of Control2.
Thanks for any help.