Retaining Subshape position when parent group moved/resized

Started by saratogacoach, January 23, 2021, 04:32:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Croc

Hi saratogacoach,
Please check the masters Master.17 and Master.18 in this file.

saratogacoach

#16
Thank you Croc,

Looks like properties in the User-defined cells for the connector lines have been added? Works well.

In a genogram, a vertical connector line, at 90 deg from the horizontal connector line for marriage, separation, divorce, is used to connect to children of that couple relationship. So I need to add 5 connection points to each type of horizontal connector line.

Adding these using the taskbar connector point tool, then correcting their position in the shapesheet.

Then, I will need to add some more items, do some fixes.

May have some more questions.

Progress!  :)

Thank you very much for your kind help.
saratogacoach

Croc

Adding connection points to a connector is not an easy task. This is much more difficult to do than to a regular line.
The fact is that the connector is redrawn when the position of the shapes changes. Therefore, a formula like Width * 0.3 will break and the connection point will "fly away" in an unknown direction.
You can try using POINTALONGPATH in this case too. But instead of 0.5 in the formula, you need to use the required offsets. For example = PNTX (POINTALONGPATH (Geometry1.Path, 0.3))
Try this technology:
1.add Connection points with the "Connection Points" tool
2. open Shape Sheet, section Connection Points.
3. Replace formulas of type Width * 0.3 with formulas of type PNTX (POINTALONGPATH (Geometry1.Path, 0.3))
Please remember that POINTALONGPATH takes into account the full length of the connector, including vertical sections. That is, as a result, the location of the connection points will slightly differ from Width * 0.3

saratogacoach

#18
Thank you, Croc.

Having some problems, as the attached VSDX file demonstrates. Tried to substitute PNTX (POINTALONGPATH (Geometry1.Path, 0.3)), PNTX (POINTALONGPATH (Geometry1.Path, 0.5)) and PNTX (POINTALONGPATH (Geometry1.Path, 0.7)) for 3 tool-added connection points on each line.

I am getting some distortions, moving of connection points on connector line. Add GUARD function?

Best Wishes,
saratogacoach

Croc

QuoteAdd GUARD function?
No. The error is simpler :)
Each connection point has two coordinates - X and Y. Therefore, you need to fill in two cells.
X with the formula PntX (...
and Y with the formula PntY (...

saratogacoach

#20
Thank you.

While GUARD for Y seemed to work, your dynamic solution is better. (I had tried the formula, but it didn't work: because I left it as PNTX (POINTALONGPATH (Geometry1.Path, 0.3)), forgot that this is PNTY (POINTALONGPATH (Geometry1.Path, 0.3)).  :-[

saratogacoach

wapperdude

Adding to what Croc has provided, attached shows how to maintain a fixed, relative horizontal position.  This example sets the position of the text control point, but can be adapted for use as previously desired.  The horizontal position is specified in the connector shapesheet, and defined in terms of horizontal width, e.g., width*0.15.

The process uses "nearest point" function.  The horizontal location is hardcoded.  Three test conditions are used to determine the "best" vertical location. 
Visio 2019 Pro

saratogacoach

Thank you for this.

Will carefully review.

Learning these strategies, as well as where in the shapesheet they are used, is very helpful.

Making good progress on creating a number of genogram shapes. Much cleanup to go, as I learn better ways to create these, then add new ones.

Again, thank you very much!

Best Wishes
saratogacoach