Help Center

Expression Builder

Expression Builder Interface

With expression builder you can specify parameters, arithmetic expressions and references to object properties for the selected cell.

You can open expression builder for a table cell and for the Attach object dialog box. Press Shift + F2 to open the dialog box.

CAD drafting Expression Builder 0CAD software Expression Builder 1

In the top part of the dialog box there is a field to enter any arithmetic expressions and use any constants and object properties.

During input, in the list of functions and constants, all items containing input are displayed. If the input is incorrect, a message about the error or a tooltip will be displayed.

CAD drawing Expression Builder 2

Click in the preview and the expression in the input field will be selected.

CAD drafting Expression Builder 3

Press the CAD software Expression Builder 4 button and the entered expression will be saved on the template formula bar.

CAD drawing Expression Builder 5

Expressions from the formula template bar are marked with a star in the list of functions and constraints.

Formula Templates

These allow expressions to be saved in templates for further use.

To save an expression, type it in the field and select the CAD drafting Expression Builder 6 button. The expression’s button will be displayed in the templates list. 

There is a tooltip when you move the cursor over the item.

CAD software Expression Builder 7

To insert a template, select the button of the saved template.

To delete a template, press the Alt button and drag the template button outside the Expression builder dialog box

CAD drawing Expression Builder 8

If there are “$” symbols in the template, after insertion they are changed to the selected text. For example, we create the Iff(Exist($);$;””) template then type the text Object.Name, select it and insert the Iff template and the symbols are changed to the text -  Iff(Exist(Object.Name;Object.Name;””).

Snap to objects

CAD drafting Expression Builder 9 - opens the Attach object dialog box.

Functions in the Expression Builder

Mathematical operations:










Raising to the power


Square-root generation

Logical operations:










not equals


not less


not more







Cos, Sin, Tg

- Trigonometric function; argument is specified in degrees.

Acos, Asin, Atg

- Arc trigonometric functions, the result received in degrees.


- Modulus.


- Rounding of number.


- Returns the sum of the variables values if the cells are grouped

note! When entering a function, pay attention to brackets.

For example:

Summ(Row) - returns the sum of the numbers of grouped rows.

Summ(Detal.L) - returns the sum of the parameter L values of the “Detail” object in grouped rows.

Data conversion:


- Data conversion to string type.


- Data conversion to numeric type.


- Numerical value conversion to string type according to the parameters of the table column.

For example:

Frm(0.001230) returns 0.0012 string if zero suppression mode and 0,0000 accuracy are set for the column containing the cell.

Selection and comparing:


- Addition of formatted strings.


- Creation of lower index.


- Creation of upper index.


- Number conversion to typesetting form.


- Not formatted text.


- Creation of fraction.


- function of logical decision. Format:

if(Logical_Condition; If_True; If_False,


Logical_Condition – logical condition with logical operations for comparing;

If_True – returned value, if logical condition is held;

If_False - returning value, if logical condition is not held.

For example:

if(object == Marker; Marker.Position; "Not determined").

If the object type attached to the column cell has a Marker value, the function returns its Position value. 

If the object has another type, the Not determined value is returned.


Checks the existence of a constant: =IF(EXIST(Object.Name);Object.Name;0)


- Returns the minimum/maximum value listed in the brackets.

For example:

Min(maximum_value; minimum_value) – returns minimum_value;

Max(maximum_value; minimum_value) - returns maximum_value.


- Returns the number of objects (for grouped rows of a table).

For example:

Count() - returns number of objects attached to the cells of the grouped rows.


- Calculates arithmetical average of arguments. It can use any number of arguments of any ranges. Null arguments are not used.


- Returns a cell value, specified by a relative index. The index format is:

Off(row; column)

For example:

Off(-1;2) - returns the cell value located one row above and two columns to the right of the current cell.


- Returns the cell value specified by an absolute index.

Merge (Cells,Expression)

- Merges the Cells in a range. If the Expression is not equal to zero, it returns the Expression value.

For example:

=merge(A5:C5; "Name") – merges cells from A5 to C5 and in the results cell, the “Name” text is displayed.


– Specifies the column height. Height value is specified in brackets.


- Calculated argument.

For example:

=val("A"+"1") - calculates "A1", and uses it as an expression (value in A1 cell). If argument is not a row, it is returned. =val(10+2) – is the same as =10+2.

=val("summ(A"+Str(off(0;-1))+":D"+Str(off(0;-1))+")") - sum of cells from A to D of row, whose number is in the cell to the left of the current one. In general, you can do without val. It is needed when you have to enter a cell address in user form to take the value from it further. Create the Addr variable, attach it to the input field in the form and enter in the table: =val(Addr). Function allows recurrence: =val(val("A"+"1")) - takes its value from the cell whose address is in cell A1. Number of enclosures is limited to 64.


- Works as Attach object . The height of the attached object is fitted to the cell height. The object is taken from the report and attached to the cell.


- Sum of the current column’s cells in the section, following after the current section.


- Number of rows in the section containing cell A3.

Reserved variables:


- Pi character.


- Returns the row number for every cell (rows are numbered from 1, the header row is not numbered).


- Returns the column number for every cell (column “A” is number 1).


- Returns the object type, attached to row cells.

Object1, Object2, …

- Objects attached to the cell.


- Table name.


- General number of rows.


- General number of columns.

Info: NanoCAD is an easy-to-use, affordable, and yet professional, CAD platform for Windows, that provides an outstanding user experience by providing top-level performance, full capability, a classic interface and native.dwg format support. nanoCAD has been built to deliver design and project documentation for all industries. nanoCAD includes a full suite of basic and advanced CAD tools for 2D/3D design and creating industry-standard DWG-compatible CAD files. Our program ensures creative, collaborative and customizable features to enhance your efficiency, and includes a few API's, allowing anything from routine task automation to complex CAD software development. You may download nanoCad for free, using the links below, and purchase later, if you like it.
We collect Cookies
We use cookies to ensure that we give you the best experience on our website. By clicking “Accept”, you agree to our website’s cookie use as described in our Privacy Statement.