Creating procedure variables

You can create procedure variables as follows.

1.  On the Calculate menu, click Procedure variables > Definitions.

The List (procedure variables: definitions) opens.

2.  Above the list, click the Create symbol.

The Create procedure variable window opens.

3.  Make the desired changes:

 

Element

Description

Attribute ID

Unique ID of the variable

Note

An attribute ID must start with a letter. Allowed are letters, figures as well as the special characters -, _ and /.

Code

Unique code of the variable

Name

Long name of the variable

Comment

Description of the variable (optional)

Procedure reference

The icon opens a new window.

Procedure step

Here you select the procedure parameter that is to be referenced by the variable.

Note

If no reference is specified, the variable has a similar functionality to a user-defined attribute of the network.

Display attributes with

You can display attributes of the procedure as long name or as ID. In the list of attributes, select the entry to be replaced by the variable. The selected attribute is then displayed under Procedure reference.

Data type

Use the list to allocate a data type. Select from the following data types:

Bool

For logical statements, that is true (Yes) or false (No)

Note

If the Allow empty value option is selected for default values, the Empty option is enabled.

File

Reference to a file

Surface

Surface according to your settings (Specifying standard units for length and speed)

Integer

Whole number

Precise duration

Precise duration, with decimal places, e.g. 35.004s

Speed

Speed in kilometers per hour

Floating-point number

Real number with a fixed number of decimal places (Selecting a decimal point)

Length (kilometers/miles)

Long length according to setting (Specifying standard units for length and speed)

Length (meter/foot)

Short length according to setting (Specifying standard units for length and speed)

Long text

String with an unlimited number of characters in case of an undefined Max. length

Alternatively, under Max. length, you can enter a value > 255.

Text

String with a maximum string length of 255

Currency

Number with a fixed number of decimal places, e.g. to display cost attributes (Selecting a decimal point).

Time

Duration in seconds, display format 12h35min12s

Time

Time in format hh:mm:ss (12:23:12) or hh:mm (12:23)

Attribute type

Data attribute

If this option is selected, you can enter the values directly.

Formula attribute

If this option is selected, the attribute values are generated based on a formula. In most cases, you will select the type Integer. With the functions Text to number and Number to text you can use the types Text and Long text in combination with formulas.

Note

If you want to insert variable values in formulas, you can insert them using the following functions:

  • Variable value text inserts the current value of the specified variable into the formula. Write the desired variable name in the bracket, for example ("ID").
  • Variable value number inserts the current numerical value of the specified variable into the formula.

For relations that refer to several objects, you can also specify a condition in the aggregation function (Fundamentals: Relations with conditions).

Default value

This value is set as the value for the new variable.

Note

If you do not enter a value for numerical attributes, the empty value is interpreted as 0 in case of arithmetic operations.

Allow empty value

If the option is selected, empty values are permitted in case of numerical or boolean data attributes.

If the option is not selected, a value must be entered.

Minimum / Maximum

If you select the respective option, you can enter a minimum permissible or maximum permissible value here.

Note: Depending on the selected Type, you can specify further attribute values and options (Type-dependent attributes).

4.  Confirm with OK.

The new variable is inserted in the list. You can edit the attributes right in the list.