Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (34 sloc) 1.83 KB
title manager ms.date ms.audience ms.topic f1_keywords localization_priority ms.assetid description
SETATREFEXPR Function
soliver
03/09/2015
Developer
reference
Vis_DSS.chm1027317
Normal
c1bd7819-b53b-bff1-69c1-6d78e8fb278b
Stores a value that is set through an action in the user interface (UI) or Automation.

SETATREFEXPR Function

Stores a value that is set through an action in the user interface (UI) or Automation.

Syntax

SETATREFEXPR ([ ** expr_opt ** ])

Parameters

Name Required/Optional Data Type Description
expr_opt
Optional
Varies
An expression that is replaced by the value or expression being assigned to the referenced cell in the SETATREF function. If not indicated, its initial value is 0 (zero).

Remarks

The value of a SETATREFEXPR expression can also be set from a SETATREF function in another cell that references the cell containing the SETATREFEXPR expression.

You are not limited to using the SETATREFEXPR function as a parameter to the SETATREF function.

Example 1

The following example uses the SETATREFEXPR function to ensure that a shape is as wide as its text.

Width =MAX(TEXTWIDTH(TheText),SETATREFEXPR())

Example 2

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

Example 3

For an example using the SETATREFEXPR function with the SETATREF function, see the SETATREF function.

You can’t perform that action at this time.