DesignSeries00016.pngIFC Data Mapping Examples

Mandatory and Default Value Examples

File exchange scenarios frequently include requirements and policies specifying that certain data fields must not be empty, or that every data field needs to have a default value. Only a couple of specific objects have a different value that will be overridden manually. To be certain that a mandatory data field always contains a value, simply include a constant at the end of the data mapping formula.

[Style.Function] ELSE ‘NOTDEFINED’

[Object.VW_Name] ELSE [Style.Name] ELSE ‘Roof’

To handle a case with a default value for most of the objects, but different values for only some specific objects, it is good practice to create a record format, and include a default record field value that becomes the default value of the data source. Then, attach that record only to the objects that will have the specifically different values, and change the value in the attached records as necessary. Objects with no such record attached will get the default value and the objects with that record attached will get the specific value.

[Record.Pricing Details.Discount];

Examples Combining Fields and Constants

The results of a data mapping formula often need to be “enhanced” to improve legibility, to add a prefix/suffix to meet certain requirements, or to be combined or calculated from multiple sources.

In this example, we need a better description of an escalator, including important information about the manufacturer and the step width. We also want to add some words to increase the legibility.

Escalator_ex.png 

Formula:

'Escalator: ' + [Object.Type] + ' Width: ' + [Object.Step width]

Result:

Escalator: Otis 510 M Width: 1000 (3' 3")

In another example, we need to set up the name of the window object to come from the Vectorworks name. If there is no Vectorworks name, we want to combine ID Prefix, ID Label, and ID Suffix fields. If all of those parameters are empty, the word “Window” should be used to identify the window.

Window_ex.png 

Formula:

[Object.VW_Name] ELSE [Object.IDPrefix] + [Object.IDLabel] + [Object.IDSuffix] ELSE 'Window'

Result with no Vectorworks name:

W-01A1

Example Using Conditions and Functions

In this example, we want to calculate the IfcWindow.OverallHeight based on the settings of our window object.

Window_ex2.png 

Window_ex3.png 

The Height parameter contains the correct value, as long as the window has no sill or, if it has a sill, it is a Brick Sill type. In any other situation, the Sill Height (3) value needs to be added to the window Height.

Formula:

[Object.OverallHeight] + IF([Object.IncludeSill] & ([Object.SillStyle] != 'Brick'),[Object.SillHeight], 0)

Result, when there is no sill, or if the sill type is Brick (adding 0 to the Height value):

2000.0

Result, when there is a sill, and it is not Brick (adding 150.0 to the Height value):

2150.0

Example Mapping Data Sources Using Selectors

IFC data requires many “enumeration” kinds of data fields. Typical examples include: PredefinedType, OperationType, ShapeType, and so on. Sometimes, there is no one-to-one correspondence; the current settings differ from IFC, no valid data sources can be mapped directly, or the values are written in another language.

In this example, we will map the Sash Operation list from the window to the required OperationType of the IFC Window Panel data set.

 

 IFC00017.png

For the mapping, we will use one of the selector functions, which maps the window Sash Operation list entries to a pair of IFC Window Panel parameters (logical and value):

SELECT2([Object.SashOperation] = 'Opening', 'FIXEDCASEMENT',

[Object.SashOperation] = 'Cased Opening', 'FIXEDCASEMENT',

[Object.SashOperation] = 'Fixed Glass', 'FIXEDCASEMENT',

[Object.SashOperation] = 'Fixed Glass - No Sash', 'FIXEDCASEMENT',

[Object.SashOperation] = 'Single Hung', 'SLIDINGVERTICAL',

[Object.SashOperation] = 'Double Hung', 'SLIDINGVERTICAL',

[Object.SashOperation] = 'Casement', 'SIDEHUNGLEFTHAND',

[Object.SashOperation] = 'Bi-parting Casement', 'SIDEHUNGLEFTHAND',

[Object.SashOperation] = 'Horizontal Slider', 'SLIDINGHORIZONTAL',

[Object.SashOperation] = 'Awning', 'TOPHUNG',

[Object.SashOperation] = 'Hopper', 'BOTTOMHUNG',

[Object.SashOperation] = 'Tilt/Turn', 'TILTANDTURNLEFTHAND',

[Object.SashOperation] = 'Vertical Pivot', 'PIVOTVERTICAL')

ELSE 'NOTDEFINED'

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

IFC Data Mapping Expressions

Creating or Editing a Data Mapping Formula

Managing IFC Data Mapping

Was this page helpful?

vectorworks.net