Generate Label
This command or action generates a text box in order to display an object attribute or entered text.
The Generate Label command is available in the context menu of objects, or as an action on dialog Modify Objects. In this case, label may be generated for multiple and/or different objects.

Placement
The placement defines the alignment of the content inside the label.
Button >>
Select the object attribute to be displayed. The range of attributes depend on the selected object type (see Table Object Attributes in the manual „Attributes, Variables, and Keywords“). When calling this action from the dialog Modify Objects to label objects of different object type at once, just intersecting attributes between all object types are available.
Button „Textbox“
Click this button, to set font alignment, size and type (see Text Box in the CadnaA Reference Manual).
Example
In this example, a label containing the ID of a road has been generated.

User defined Label
By selecting the option „User Defined“ within the dialog, the input box „Code“ can be edited. Alternatively, the input in box „Code“ can be saved by clicking the button „Predefined“ or a saved label format be deleted.
Editing the Code
Editing the code offers - for example - to display several object attributes in a single label (text frame). Proceed as follows:
- Select the first object attribute to be displayed via >>.
Subsequently, in the box „Code“ shows the expression generated by CadnaA [normal format: #(ObjAtt, %1, {attribute})].
- Select the option „User defined“ within the dialog.
- Copy this expression and insert it into the next line by pressing the RETURN key.
- Now, change in the second line the attribute name as desired (see Table Object Attributes in the manual „Attributes, Variables, and Keywords“).
You may also enter additional text.
Example
The task is to display the level LP1 and its limiting value GRENZ1 in a label near a receiver point.
After selecting the attribute LP1 via >>, switch to option „User defined“. Copy the row copied and insert it into the next line after pressing the RETURN key. Now, edit the second line by replacing LP1 by GRENZ1:

The numerical values in the expression mean:
1 = one decimal will be displayed
0.500 = rounding the last decimal starting from 5
Save/delete label format
Select via the option „User defined“ and via „Predefined >>“ the option „Save as“ to save the label and its user-defined coding. Enter, for example, the name „LP1 and Limit“.

After clicking OK, this new label format can be selected from the „Predefined“ button. Existing label formats can be removed using the „Delete“ command.
String Variable
Selecting „MEMOTXTVAR“ via the button >> enables to display information saved in the object‘s memo-window
. Subsequently, enter the string variable‘s name in the „Variable“ box.
Example
In the memo-window of buildings the number of floors are available, e.g. x=2; x=5 etc. In this case „x“ is the name of the string variable. These figures shall be display in labels near the buildings, however, with the text string „no. of floor“ going in front.
- Select on the dialog Modify Objects the action "Generate Label" for building and click OK.
- Select MEMOTXTVAR via the button >>
- Enter for "Variable" the name "x".
- Now, select the option „User defined“ and type the string „no. of floors = “ in front of the existing expression in box „Code“.
- Click OK and confirm the query by "all".

After OK the labels show the text strings „no. of floors = 2“, „no. of floors = 3“, etc.
Arithmetic operations in text boxes
Calculations can be performed directly within the label. For this purpose, the common arithmetic operations (see manual "Attributes, Variables and Keywords“) are available.
Example
For this example, the level LP1 calculated at a receiver is to be displayed with a label. In a second line, this level should be displayed with an addition of +5 dB. To do this, you can define the following expression using "Generate label":
