SETATREFEXPR Function
Last modified: March 09, 2015
Applies to: Office 2013 | Visio 2013
In this article
Syntax
Remarks
Example 1
Example 2
Example 3
Stores a value that is set through an action in the user interface (UI) or Automation.
The following example shows how you can use the SETATREFEXPR function to cause your shapes to snap to a custom grid. The SETATREFEXPR formulas are placed in the PinX and PinY cells, causing the shape's pin to snap to the grid defined in User.GridX and User.GridY.
User.GridX =2 in
User.GridY =2 in
PinX =INT(SETATREFEXPR()/User.GridX + .5)*User.GridX
PinY =INT(SETATREFEXPR()/User.GridY + .5)*User.GridY