DesignSeries00015.pngIFC Data Mapping Expressions

IFC mapping formulas calculate and display the values of certain property set parameters, mapping BIM data to IFC-compliant data. Custom mapping can be created and used for custom property sets.

Mapping and associated formulas display in the IFC Data dialog box; formulas can be mapped and edited from the IFC Data Mapping dialog box.

    In the IFC Data dialog box, the existing mapping displays in the Data Source parameter of the selected property (see Assigning IFC Data to Objects).

    In the IFC Data Mapping dialog box, the mapping formulas of the selected data sets of an object are displayed on the right portion of the dialog box (see Creating or Editing a Data Mapping Formula). These mapping formulas can be created or edited from the Define Mapping dialog box, which is accessed by clicking Define Mapping.

Viewing the default data mapping formulas in the IFC Data Mapping dialog box helps you understand the data source of the mapped IFC values. Expressions can be used to customize the automatic data mapping formulas.The results of the expression calculations are assigned to the Data Source parameter.

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

Constants are written as follows.

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

The supported operators are listed.

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.

The supported variables are listed.

Variable
Format
Example

Parameters from an object

[Object.NameOfTheParameter]

[Object.Config]

[Object.Column ID]

[Object.Struct Type]

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]

Class name

[ClassName]

[ClassName]

Layer name

[LayerName]

[LayerName]

Functions

The supported functions are listed.

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

LEFT (text, index)

Returns the left-side of the string, split by position index (0 is the position of the first character). Returns an empty string if the index value is incorrect.

RIGHT (text, index)

Returns the right-side of the string, split by position index (0 is the position of the first character). Returns an empty string if the index value is incorrect.

MID (text, index, count)

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

FIND (text, subtext)

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

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.

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

IFC Data Mapping Examples

Creating or Editing a Data Mapping Formula

Managing IFC Data Mapping

Was this page helpful?

vectorworks.net