News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 260 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1120KB.
Tokens: post-login.
Cache hits: 13: 0.00166s for 26,732 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]