Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Basically there are two major types of a variable that differ in the point of time when the variable is substituted by a specific value:

  • design-time substitution: The variable is used in a block that is added to a library. When the block is used, that is, it is dragged from the library listing onto the visualization page, then the user is prompted to provide specific values for the used block variables. This is useful e.g. to prepare a lighting control block in the library. When the block is instantiated on a page then specific parts of ItemIDs are replaced while other properties remain constant.

  • run-time substitution: The variable is used in a visualization element. When the element is displayed the variable is substituted by its specific value. Variables of this kind can be defined for layers, pages, groups and other visual elements.

Variables for design-time substitution

Code

Syntax

Description

BK

{BK:<var

name>}

Definies a block variable.

Block variables are replaced during design-time when a library element is instantiated on a visualization page.

  • Set up the library-element-to-be and insert the variable syntax when needed, e.g. as part of an item ID.

    Image RemovedImage Added
  • Add the element to the library

  • Use the library element by dragging it onto the page. You will be prompted to enter specific values for the used block variables:

    Image RemovedImage Added
  • All

    occurences

    occurrences of variables in the inserted block are replaced by the provided values.

    Image RemovedImage Added

Variables for run-time substitution

Click menu Views / Variables to trigger visibility of the Variables pane. It contains a list of variables available to the current selection. Following variable types are available:

Code

Syntax

Description

Notes

MA

{MA:<var

name>}

Variable of parent object (sequence: GR/LA/PG/WS)


GR

{GR:<var

name>}

Variable of a

group

group object


LA

{LA:<var

name>}

Variable of a

layer

layer object


PG

{PG:<var

name>}

Variable of a page object


WS

{WS:<var

name>}

Variable of a

workspace

workspace object


OB

{OB:<var

name>}

Variable of the current graphic object


OV

{OV:<graphic

object

id>.<var

name>}

{OV:this.<var

name>}

Object variable of the graphic object with the given ID.

The referenced object has to be on the same visualization page as the referencing object.

Use "this" for the <graphic object id> to get properties of the current object.


IV

{IV:<Item

ID>}

{IV:this}

Item value

"this" uses the value of the last item ID written to the control


IP

{IP:<Item

ID>.<Property

ID>}

{IP:this.<Property

ID>}

Value of an item’s property (e.g. {IP:"NETx\VIRTUAL\Simulation\Device\Fassade".3 } yields the value of property ID 3 (i.e. Quality) of the item).

"this" uses the last item written to the control


CH

{CH:<character

code>}

Special character. Possible character codes are

  • NL: newline


SV

{SV:<var

name>}

System variable. Possible variable names are

  • USERNAME: name of the current user

  • PAGENAME: name of the current page

  • PROJECTNAME: name of the running visualization project

  • DEVICENAME: name of

the current
  • the current device




available since 4.2.2061

VT

{VT:<key>.<index

value>}

Variable of Excel file nxaVarTable.xslx (in Visualization project's DataFiles folder) 

available since 4.1.2000

OT

{OT:<index

value>}

The control name must be identically with the variable name within the first column of the Excel file.

available since 4.1.2000

EV

{EV:<mathematical

expression>}

Evaluates a mathematical expression, e.g. 

Code Block
{EV:"(500+200)/{PG:Eval}"}

adds the constants 500 and 200 and divides the result by the value of the page variable (PG) "Eval". The original expression is replaced by the arithmetic result before further processing.

available in web from 4.1.2010

internally, a .NET DataColumn.Expression is used

TT

{TT:<translation

key>}

Yields the translation of the provided translation key depending on the value of the NXA_LANGUAGE workspace variable.

available since 4.2.1010

PR

{PR:<prop

name>}

Property value of the current graphic object (e.g. {PR:WIDTH} – yields the value of

the 

the WIDTH

 property

 property of the graphic object).

available since 4.2.1000

OP

{OP:<graphic

object

id>.<prop

name>}

{OP:this.<prop

name>}

Property value of the graphic object (e.g. {OP:Image1.WIDTH} – yields the value of

the 

the WIDTH

 property

 property of the graphic object “Image1”)

The referenced object has to be on the same visualization page as the referencing object.

Use this for the 

Use this for the graphic object id

 to

 to get properties of the current object.

available since 4.2.1000

IE

{IE:<Item ID>}

ItemExists 

Item Exists  - Variable provides existence of Item ID or Item Branch. (e.g. {IE:"NETx\VAR\Boolean"}). True if Item ID or branch

is existed and false otherwise

exists – false otherwise.

available since 4.

1

2.

1158

2065