DesignSeries00023.pngIFC Data Mapping Expressions

Each formula consists of one or more expressions from the following list. The expressions are described in more detail in the rest of this section.

Expression

Description

Constants

Types of data, such as integers, Boolean constants, numbers, and text constants

Fixed values

Text strings, numerical and logical values, and so on

Operators

Addition, subtraction, comparison, and so on

Variables

Vectorworks data sources, such as object parameters, style information, class name

Functions

Mathematical functions, string manipulations, conditional functions, and more

ELSE

Method of adding alternative data mapping, if the previous one yields an empty value

Constants

Constant

Description

Examples

Boolean

Values are used for Boolean parameters, and are either true or false, written as string constants enclosed within apostrophes

‘FALSE’ 

‘TRUE’

Integer

Positive or negative numbers and 0, written as numbers with no decimal point or apostrophes

4

125

Rational number

Real number values, written as a number with a decimal point and no apostrophes

3.14

-12.0

248.141539

Text

String values enclosed within apostrophes

‘Unstyled Wall’

‘INTERNAL’

‘NOTDEFINED’

Operators

Operator

Description

+

Unary Plus

-

Unary Minus

+

Binary Plus, Addition, Concatenation

-

Binary Minus, Subtraction

*

Multiplication

/

Division

=

Logical EQUALS 

!

Logical NOT 

|

Logical OR 

&

Logical AND 

!=

Logical NOT EQUAL 

>

Greater than

<

Less than

>=

Greater than or equal

<=

Less than or equal

Variables

Variables represent sources of data from Vectorworks. They can be combined with constants, function results, and other variables by using operators. The variable type (name) is the same as that of the data source type. Variables are enclosed by square brackets, since spaces are permitted in the name.

Variable

Format

Example

Parameters from an object

[Object.NameOfTheParameter]

If the parameter is a pop-up field, the variable returns the localized value. If you need the universal value instead, add an asterisk after the name of the field.

[Object.Config]

[Object.Column ID]

[Object.Struct Type]

[Object.structuralUse*]

Vectorworks name

[Object.VW_Name]

[Object.VW_Name]

Record field data from a record format

[Record.NameOfTheRecord.NameOfTheField]

If a record by that name is not attached to the object, then the default value of the record field is taken as the value of the variable.

[Record.MyRecord.Price]

[Record.Plant Record.Latin Name]

Data from style

[Style.NameOfTheField]

Currently supported data fields are: Name (the name of the style), Mark, Function, Description, Exterior (Boolean), Load-Bearing (Boolean), Fire Rating, Combustible Construction (Boolean), Compartmentation (Boolean), U-Value, Acoustic Rating, Cost Index System, Cost Index Code, Model, Manufacturer.

[Style.Function]

[Style.Name]

[Style.Fire Rating]

Component

[Component.NameOfTheField]

Currently supported data fields are: Name (the name of the component), Function, Class, Thickness, Lambda, U-Value. When the “export by components” option is not used, these variables correspond to the core component.

[Component.Function]

[Component.Thickness]

Class name

[ClassName]

[ClassName]

Layer name

[LayerName]

[LayerName]

Story name

[StoryName]

[StoryName]

Functions

Function

Description

PI ( )

Returns the number pi.png

SIN (radians)

Returns the sine

COS (radians)

Returns the cosine

ABS (number)

Returns the absolute value

SQRT (number)

Returns the square root

INT (number)

Returns the converted integer value

REAL (number)

Returns the converted real value

IF (logical_expression, value_expression1, value_expression2)

Calculates logical_expression and returns the calculated value of value_expression1, if TRUE, or value of the value_expression2, otherwise

SELECT1 (number_expression, value_expression1, value_expression2, …, value_expressionN)

Calculates number_expression and returns the calculated value of value_expression1, if the result is 0, value of the value_expression2, if the result is 1 and so on. Returns the value of the last expression, if the result is bigger than N-1. The number of the function parameters must be 3 or more.

SELECT2 (logical_expression1, value_expression1, logical_expression2, value_expression2, …, logical_expressionN, value_expressionN)

Calculates the first logical expression and returns the calculated value of value_expression1, if the result is TRUE; otherwise, continues with the next logical expression and value expression pair. The number of the function parameters must be even, and greater than 2.

COUNTER (“name”)

Returns auto-incremented values (for generating unique values)

BOUNDS (“name”)

Returns X-, Y-, Z-, or Width/Height/Depth dimensions of an object

LEFT (text, count)

Returns the left side of the string, using the specified count of characters. Returns an empty string if the count value is incorrect.

RIGHT (text, count)

Returns the right side of the string, using the specified count of characters. Returns an empty string if the count value is incorrect.

MID (text, index, count)

Returns the right side of the string, split by the position index (0 is the position of the first character) and using the specified count of characters. Returns an empty string if the index or count values are incorrect.

FIND (subtext, text)

Returns the zero-based position of subtext in text, if found, or -1 if not found.

Example: example FIND (‘fo’, ‘foo’) returns 0 and FIND (‘oo’, ‘foo’) returns 1.

LEN (string)

Returns the length of the string

INSERT (string1, index, string2)

Inserts string2 in string1 at the given position index

DELETE (string, index, count)

Removes the right side of the string, split by position index and having the specified count of characters

REPLACE (string1, string2, string3)

In string1, replaces all occurrences of string2 with string3

TRIMLEFT (string)

Returns the left trimmed string from whitespaces

TRIMRIGHT (string)

Returns the right trimmed string from whitespaces

MAKEUPPER (string)

Returns the uppercase string

MAKELOWER (string)

Returns the lowercase string

~~~~~~~~~~~~~~~~~~~~~~~~~

IFC Data Mapping Examples

Creating or Editing Mapping Formulas

Mapping IFC Data

 

Was this page helpful?