Author Topic: SetAtRef et al.  (Read 16569 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: SetAtRef et al.
« Reply #15 on: March 15, 2015, 07:30:17 PM »
@spandex: 
Quote
Going through your shapesheets, I have a question: when either of your shapes changes line rounding via the Shape Data dialog (dbl-click), what mechanism causes the Rounding field in the same shape to update?

The attached drawing shows the SETATREF process as applied to your case.

Wapperdude
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: SetAtRef et al.
« Reply #16 on: March 16, 2015, 12:24:00 AM »
Not at the level that Vojo was requesting, that would take considerably more time, but here's an update to some simple documentation as pertains to this particular post thread.

There is one disclaimer, on page-3, I state that SETATREF avoids endless looping.  Haven't confirmed that statement, so, just beware!

The Visio file has 3 pages.  It's a small start.

Wapperdude

EDIT:  Ooops.  The sheet.2 diagram should look same as sheet.1 block diagram.
« Last Edit: March 16, 2015, 12:28:24 AM by wapperdude »
Visio 2019 Pro

spandex

  • Jr. Member
  • **
  • Posts: 16
Re: SetAtRef et al.
« Reply #17 on: March 25, 2015, 12:28:24 PM »
Thanks so much, Wapperdude, for these examples. I just downloaded the latest updates from the What's with SETATREF anyway? topic, and I plan to go through it until I understand SetAtRef.

I implemented Example 2 in the SETATREF Function.docx file, and I'm having a hard time understanding parts of it. I can see how moving the child shape works, but how does moving the parent cause the child to follow? If it's via normal "dependency" recalculation, what part of the PinX/Y formulas are involved? The first of two articles from Microsoft's blog states this:

During the recalc operation, the SETATREF function is transparent. SETATREF(x) = x. In other words, the result of the recalc is just like if there were no SETATREF wrapped around the cell references.

At the risk of seeming pedantic, SetAtRef most frequently seems to have two arguments. So, which of these two are correct for normal recalc:

SetAtRef(x,y) = x
SetAtRef(x,y) = y

Thanks for any help you can provide!

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: SetAtRef et al.
« Reply #18 on: March 25, 2015, 03:34:50 PM »
I've only seen SETATREF with single argument...best I recall.

Take a look at the latest Visio file...It diagrams basic function of the formula, has examples, progresses to the full syntax implementation...SETATREF(SETATREFEVAL(SETREFEXPR())).
Visio 2019 Pro

spandex

  • Jr. Member
  • **
  • Posts: 16
Re: SetAtRef et al.
« Reply #19 on: March 26, 2015, 07:01:46 AM »
I've only seen SETATREF with single argument...best I recall.

I'm likely using incorrect terminology. I copied this from your SETATREF Function.docx file:

Syntax:  SETATREF(reference [,set_expression [,ignore_eval]])

I use the term arguments to refer to the list of comma-separated values inside the parentheses. If this were correct (and it looks like it isn't), SETATREF with two "arguments" (i.e., SETATREF(reference, set_expression)) is the most prevalent usage I've seen.

Take a look at the latest Visio file...It diagrams basic function of the formula, has examples, progresses to the full syntax implementation...SETATREF(SETATREFEVAL(SETREFEXPR())).

Fantastic! Thank you SO much for all of your efforts.


wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: SetAtRef et al.
« Reply #20 on: March 26, 2015, 09:54:38 AM »
Ah!  Yes, I would say your terminology is probably correct.  What threw me off was
   SETATREF(x,y) = x
   SETATREF(x,y) = y

While those may be valid statements, context is crucial!  Each represents a step in progress of the function executing.

As an end user, I can only share my experiences and my understanding as a result of those experiences.  So, while I try to be accurate, don't take what I share as authoritative.  Indeed, I still make discoveries and experience "Aha!" moments.

Back to your question about single argument...yes it's valid.  It is one of the MS examples.  Yes, it is the less common form seen. In addition, there are other ways to exploit SETATREF to effectively have two "references".  This last scenario involves placing SETF inside the SETATREF function.

Examples are in the Visio file.

Wapperdude



Visio 2019 Pro

Visisthebest

  • Hero Member
  • *****
  • Posts: 809
Re: SetAtRef et al.
« Reply #21 on: November 26, 2022, 06:48:16 AM »
Wapperdude thank you amazing work on helping us understand SETATREF() better, still getting my head around it but it is already solving my problem with the behavior of the List structure shape. Only SETATREF works for this, GUARD() does nothing to protect my formulas in this case.
Visio 2021 Professional

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: SetAtRef et al.
« Reply #22 on: November 27, 2022, 12:11:11 AM »
@Visisthebest:  don't know if you've seen this development, http://visguy.com/vgforum/index.php?topic=6383.msg26747#msg26747, but it's a quasi tutorial on the Setatref() family of functions.
Visio 2019 Pro

Visisthebest

  • Hero Member
  • *****
  • Posts: 809
Re: SetAtRef et al.
« Reply #23 on: November 27, 2022, 05:28:14 AM »
Yes I meant that topic as well thank you Wapperdude, very useful Visio example files to understand SETATREF functions better!
Visio 2021 Professional

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: SetAtRef et al.
« Reply #24 on: November 27, 2022, 10:29:41 AM »
👍
Visio 2019 Pro