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

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3622
  • 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: 3622
  • 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: 3622
  • 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: 3622
  • 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