Inhalt

Index

Formulas, arithmetic functions and operators

Tools: Label Style - Formula Definition + Define Cell - Formula

Arithmetic operators

+

Addition

()

Parentheses

-

Subtraction

(())

Nested parentheses

*

Multiplication

e

A power of ten in floating-point representation

/

Division

^

Power

Supported arithmetic functions

Note: The arithmetic functions that can be used with label styles are different from those provided by the Function () tool (How). Click here to see an overview.

Allplan

Math.

Explanation

ABS(X)

|x|

Absolute value

SQRT(X)

Square root

SQR(X)

x2

Square

PI(X)

PI

Circle function of pi PHI(2) = PI * 2

LN(X)

ln x

Natural logarithm (Base e)

LOG(X)

log x

Logarithm for base 10

RCP(X)

1/x

Reciprocal of x

EXP(X)

ex

Exponential function (basis x)

SGN(X)

-

Sign 0=0 <0=-1 >0=+1

SIN(X)

sin x

Sine

COS(X)

cos x

Cosine

TAN(X)

tan x

Tangent

ASIN(X)

arcsin x

Arc sine

ACOS(X)

arccos x

Arc cosine

ATAN(X)

arctan x

Arc tangent

SINH(X)

sinh x

Hyperbolic sine

COSH(X)

cosh x

Hyperbolic cosine

TANH(X)

tanh x

Hyperbolic tangent

NINT(X)

-

Rounding to the next integer

INT(X)

-

Rounds down to nearest integer

CEIL(X)

-

Rounds up to nearest integer

GRA(X)

-

Radians to degrees

RAD(X)

 

Degrees to radians

GON(X)

-

Radians to grads

RAG(X)

 

Grads to radians

AVG(x1; x2; ..)

-

Average of up to 10 semicolon-separated arguments (AVG(1;3)=2)

MIN(x1; x2; ..)

-

Minimum of up to 10 semicolon-separated arguments (MIN(1;3)=1)

MAX(x1; x2; ..)

-

Maximum of up to 10 semicolon-separated arguments (MAX(1;3)=3)

FLAG(Value; bit[n];...)

-

Offers a Binary check.
For example:
Value = 25 --> binary: 11001

FLAG(Value; 1) returns 1 because the first flag from the right is set.
FLAG(Value; 2; 3) returns 0 because neither the second flag nor the third flag from the right is set.
FLAG(Value; 3; 4) returns 8 because the fourth flag is set.

ROUND(X;x)

-

Rounds off any number (X) to a specific number of digits
(ROUND(1.13333;2)=1.13)

ROUND(X;y;z)

-

Rounds off any number (X) to a specific number of digits (y) by using a specific rounding precision for the last digit (z)
(ROUND(1.13333;2;5)=1.15)

ELE()

-

Filters several numeric values of an attribute and returns 0 or 1
Example:
ELE(Thickness;0.115;0.24;0.365)
detects all walls of the thickness specified

VALUE(string;index)

-

Derives any values from texts
Example:
STR_TEST = "There are 6 rooms and 2 bathrooms in my house"
VALUE(STR_TEST;1) + VALUE(STR_TEST;2) = 8

MID(Text;
First_Character;
Number_Characters)

-

Returns a specific number of characters of a character string

PARENTPRECAST()

-

Enables the selection of attributes of the upstream precast element (parent element) of reinforcement elements and fixtures in legends, label styles and reports.
For example, you can create a report of all bars with their local mark number below individual precast elements in the placing drawing.

Tip: You can also find bars or fixtures that do not belong to any precast element using the PARENTPRECAST () command. The filter is used to search for bars or fixtures for which there is no upstream precast element (attribute Precast ID, @1877@ = 0)

FORMAT(format string; value1; [value<n>]; ....)

-

Is used for formatted output of values
Example:
FORMAT("B/H=%.2f / %.2f"; @220@; @222@)
delivers a string
"B/H=1.55 / 2.03"

%.2f is a placeholder that rounds off the value to two decimal places and is pasted into this text passage. In this example, the length (@220@) will be inserted into the first placeholder and the height (@222@) into the second placeholder with two decimal places each.

You can find further information at
http://www.cplusplus.com/reference/cstdio/printf/

IMPPRE(Parameter1; Parameter2)

-

This is used to convert a metric unit into the current American unit in use (feet, inches) for dimensions.

Parameter1 defines the attribute to be converted.

Parameter2 defines the unit of the attribute currently set.

  • Parameter2 = not stated -> attribute in mm
  • Parameter2 = 1 -> attribute in cm
  • Parameter2 = 2 -> attribute in dm
  • Parameter2 = 3 -> attribute in m
  • Parameter2 = 4> attribute in km
  • Parameter2 = any other value -> attribute in mm

Note: Make sure you enter a space after Parameter1;.

FIXTURECOUNT(Attribute;Value)

-

Calculates the number of fixtures with a specific attribute in a precast element.
Other criteria can also be used.
For example:
FIXTURECOUNT(@1332@;"E-Dose,Halox")
Number of fixtures with catalog reference (attribute @1332@) "E-Dose" or "Halox"

GROUP(instruction;attribute)

-

It groups elements containing attributes such as reinforcement, precast elements and similar. The GROUP function considers 3 different scenarios:

  • Attribute on considered element (e.g. bar) available & in group; bar dimensioned & grouped
  • Attribute on considered element (e.g. bar) available & not in group; bar not dimensioned
  • Attribute on considered element (e.g. bar) not available; original dimensioning for bar

Note: Only one individual attribute can ever be evaluated with the GROUP function.

For example, one grouping using the attribute Dim. string index (@1013@, Integer) could appear as follows:
GROUP("1-4:A; 5-8:B";@1013@)
All elements with dimension string index = 1-4 are listed on a dimension line, which has text A as the dimension line name. Elements with dimension string index = 5-8 are listed on a second dimension line, which has text B as the dimension line name.

OPENINGMACROCOUNT(Attribute;Value)

-

You can, for example, count all openings with an opening macro for slabs or wall elements (iWall), which geometrically influence the selected precast element. Openings that lie outside or that only touch the precast element are not counted.
Other criteria can also be used in the same way as the FIXTURECOUNT function.
For example:
OPENINGMACROCOUNT(@507@;"Holzab")
counts all openings containing a macro with the name (Attribute @507@) = HolzAb.

Syntax of Allplan's formula interpreter (Backus-Naur form)



Allplan

(C) ALLPLAN GmbH

Privacy policy