SETATREF() formulas in glued cells, cannot find them

Started by Visisthebest, April 12, 2023, 10:46:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

In Microsoft's SETATREF documentation: https://learn.microsoft.com/en-us/office/client-developer/visio/setatref-function

it says this:

"If shapes are glued, Visio follows the SETATREF reference chain within the same sheet and places glue formulas in the referenced cell."

When I glue shapes in Visio 2019/2021 desktop (gluing them together on one of the connectors of each shape), there are no SETATREF formulas however there are formulas like this:

=LOCTOPAR(PNT(Square.2!Connections.X1+20 mm,Square.2!Connections.Y1+20 mm),Square.2!EventXFMod,EventXFMod)

Maybe this changed between Visio versions, or:

Do you maybe get SETATREF() formulas when you glue shapes to their respective geometries, haven't ever used that however.
Visio 2021 Professional

Surrogate

#1
Quote from: Visisthebest on April 12, 2023, 10:46:25 AM=LOCTOPAR(PNT(Square.2!Connections.X1+20 mm,Square.2!Connections.Y1+20 mm),Square.2!EventXFMod,EventXFMod)
Visio application engine prescribes such formulas. It can replace user's hand-written formulas.

I try to avoid using the SETF/SETATREF functions in the geometry-related or Glue Info sections

Visisthebest

Why do you try to avoid using the SETF/SETATREF functions in the geometry-related or Glue Info sections?

I kinda like these formulas are very resistant to changes made to shapes by either the user or Visio, but no full understanding of the disadvantages these are some of the hardest formulas to wrap my head around!
Visio 2021 Professional

Surrogate

This is all my humble personal opinion based on a little experience with it! I've only had a couple of attempts in which I failed to create a change-resistant formula.
My personal score is Visio engine - Surrogate 2:0  :o

Interesting to hear about the positive experiences of users in our community

Visisthebest

In my experience SETATREF() is resistant enough for a lot of uses.
Visio 2021 Professional

wapperdude

QuoteWhen I glue shapes in Visio 2019/2021 desktop (gluing them together on one of the connectors of each shape), there are no SETATREF formulas however there are formulas like this:

Visio doesn't add SETATREF formulas.  It "honors" pre-existing formulas.  In your "glue" example, that is the standard glue formula structure.  As there was no pre-existing SETATREF, there is no subsequent SETATREF.

For more examples, see forum post:  http://visguy.com/vgforum/index.php?topic=6383.msg26308#msg26308
Visio 2019 Pro