Group Shape Master Formulas Not Evaluating When Dropped

Started by efowler, August 23, 2022, 03:55:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wapperdude

Ooops!!!  Well that was interesting.  3rd times a charm.  This time the end point failed.  The formula remained in tact, but the value does give REF#.

Converted to Croc's technique.  That performs better, but, as he mentioned, the End lbl doesn't track with line end movement.  It appears the formula is not updating after drop.

Haven't gone any further.
Visio 2019 Pro

Croc

Quote...as he mentioned, the End lbl doesn't track with line end movement.
This refers to the original version, which does not work well.
The second master, in which the function is moved to the group, works fine.

wapperdude

#17
@Croc:  Ah. Yes.  Well, looks like I independently confirmed your discovery.  Here's my version.  The differeence that I can tell is that I set the label box size to be based upon the txt size.
Visio 2019 Pro

Croc

By the way, after a little effort, I found out that the idea with EventDrop also works. But the reference to the group has to be calculated through the ID() function. That is, to get a "Sheet.4" link, you will have to write "Sheet."&ID()
Then the formula for the end point will look like
EventDrop = SETF(GetRef(Sheet.7!PinX),"PNTX(POINTALONGPATH(Sheet."&ID()&"!Geometry1.Path,Sheet."&ID()&"!User.Label_B_Distance))")
+SETF(GetRef(Sheet.7!PinY),"PNTY(POINTALONGPATH(Sheet."&ID()&"!Geometry1.Path,Sheet."&ID()&"!User.Label_B_Distance))")

Two more SETFs will have to be added to serve the begin point of the connector. I'm not going to write this so as not to confuse readers :)
In the attached .vsdx file, this is implemented in the "drop" master.
---
This is the method that I suggested at the very beginning, referring to the article. But the example in the article is designed for a permanent reference like TheDoc, and in this case the reference should lead to a group. And the name of the group changes when the master is copied to the drawing page. But the inheritance mechanism does not take this into account in the POINTALONGPATH function argument. Therefore, we have to calculate the name yourself using the ID() function.

wapperdude

@Croc:  Some nice discoveries.  However, it would seem that the simpler method is more appropriate than this latest solution.

Changes to the simpler approach could be to a have a more efficient method of modifying the location of the label and possibly  the LocPin assignments.  The location improvement could be as simple as using shape data, or a more freeform using control points.
Visio 2019 Pro

efowler

You guys are talking way above my head, but I did try putting the Pin formulas in the master user section and referencing those cells from the label Pin cells, and it worked perfectly. Still have no clue why that's required, but happy to have it working. Thank you both for your help!