In Renga the formula can be set in the constraint expression in the Profiles editor, in the object properties expression, or when preparing or filling out a title block.
When composing formulas, you can use constraint names, arithmetic operators, constants, functions and logical operators.
To compare the value of a variable to a string or to assign a string value using a logical expression, you must enclose the string in single quotes. Variable names should be written without quotes.
When you set a formula in a constraint expression in the Profiles editor, you can use as variables the names of constraints exist in the current profile.
When you set a formula in an expression for a object property you can use references to the values of parameters, properties, and quantities of the object, as well as to the Project Information data and properties of the Project, Site, and Building.
When preparing or filling out a title block as variables in formulas, you can use references to the property values of the Project, Site and Building and Drawing parameters and properties.
( ) |
operator parentheses |
+ |
addition |
- |
subtraction |
* |
multiplication |
/ |
division |
% |
integer division |
^ |
raise to a degree |
sqrt |
square root |
ln |
natural logarithm |
lg |
common logarithm |
abs |
absolute value |
ceil |
rounding off to a larger integer |
floor |
rounding off to a smaller integer |
round |
rounding off to a nearest integer |
sin |
sine with argument in radians |
cos |
cosine with argument in radians |
tan |
tangent with argument in radians |
asin |
arcsine with the result in radians |
acos |
arccosine with the result in radians |
atan |
arctangent with the result in radians |
sind |
sine with argument in degrees |
cosd |
cosine with argument in degrees |
tand |
tangent with argument in degrees |
asind |
arcsine with the result in degrees |
acosd |
arccosine with the result in degrees |
atand |
arctangent with the result in degrees |
deg |
function to convert radians to degrees |
rad |
function to convert degrees to radians |
M_FI |
1.6180339887499 |
Φ is an irrational number of the golden section. |
M_E |
2.71828182845904523536 |
е is the base of a natural logarithm. |
M_PI |
3.14159265358979323846 |
π is the ratio of circumference to diameter. |
M_PI_2 |
1.57079632679489661923 |
π/2 |
M_PI_4 |
0.785398163397448309616 |
π/4 |
M_PI2 |
6.28318530717959 |
2π |
M_SQRT2 |
1.41421356237309504880 |
Square root of 2. |
M_RADDEG |
57.29577951308 |
Ratio of converting radians to degrees (180/π). |
M_DEGRAD |
0.01745329251994 |
Ratio of converting degrees to radians (π/180). |
FLT_EPS |
1.19209290E–07 |
Difference between 1 and the least value greater than 1 that is representable. |
== |
identical |
!= |
not identical |
> |
greater than |
< |
less than |
>= |
greater than or equal to |
<= |
less than or equal to |
! |
logical negation |
&& |
logical AND |
|| |
logical OR |
?: |
a logical expression of type A ? B : C (if A is true, then B, else C, where A, B, and C can be expressions). |
ceil(Net volume * 1e9 / Product volume) |
The algebraic expression that defines the value of the product quantity in the net volume of an object. The value is rounded to the larger integer. |
(D1 >= 40) && (D1 < 80) ? D2 : 0 |
The logical expression that defines a dimensional constraint. If D1 is greater than or equal to 40 and less than 80, the value is D2, else 0 |
Room name == 'Balcony' ? Net floor area * 0.5 : Room name == 'Terrace' ? Net floor area * 0.5 : Net floor area |
The logical expression that defines the value of a property of an Area data type according to room name. If the room name is Balcony, its area is half of the net floor area. If the room name is Terrace, its area is half of the net floor area. In other cases, the floor area is equal to the net floor area. |
{ Window width == 900 ? 'Small Window' : Window width == 1200 ? 'Large Window' : 'Error'} |
The logical expression that defines the value of the String data type property according to the value of the Numeric parameter. If the width of the window is 900 mm, the value of the property is Small window. If the width of the window is 1200 mm, the value of the property is Large window. In other cases - Error. |
For examples of the properties of different types of data, see Data type.