Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Bentley i-model View Builder

Contents
1

I-model view and Bentley i-model View Builder.........................................2

Create, save and load i-model Views.........................................................3

Build View Table......................................................................................... 5


3.1

D-Tree.................................................................................................. 5

3.2

Set up View columns........................................................................... 6

3.3

Roll-up columns................................................................................... 7

3.4

Custom Columns.................................................................................8

3.5

Pivot columns...................................................................................... 9

3.6

Un-pivot Columns..............................................................................10

Preview Result.......................................................................................... 11

Deploy i-model view for ODBC Access.....................................................12

I-model view and Bentley i-model View Builder

i-model view is a set of dynamic virtual tables of i-model business data. It can
1) be a conceptual transformation of i-model business data,
2) provide a relevant view of the data to an application by encapsulating
the complexity of underlying i-model schema and pulling data from
multiple classes, and
3) be used to implement MVD (Model View Definition) of a Standard
schema like IFC.
The following graph shows how COBie Space table is pulled from an IFC imodel.

Bentley i-model View builder is a tool to create i-model views and preview
view result. It starts with an i-model based on its built-in schema. The view is
applicable to other i-models with the same schema. The following graph
shows how the COBie Space view is created from IFC i-model.

Create, save and load i-model Views

A view file is in the format of xml. It contains all the table definitions based on
a certain schema.
1) Use an i-model as reference to build the view. When Bentley i-model
View Builder is open, it will prompt to open an i-model to start.

i-model schema will show up when i-model is loaded.

2) Open and Save View definition using File menu.

3) Manage view tables using New, Remove and Rename buttons

Build View Table

3.1D-Tree
View table definition defines table columns and how the rows are generated.
It is represented as a D-Tree (de-normalization tree). This tree has all
necessary classes and their relations to project a view.
Each node in D-Tree represents a class in the schema embedded in an imodel. Related classes are connected to each other via edges. Each edge is
specified by a relationship that links the two classes together. The top class
or root node specifies which class to start the de-normalization process and
thus defines how the rows are generated.
To build the D-Tree,
1) Drag a class of interest in the schema tree on the left and drop in the
D-Tree window. To search for a class in the schema, type its name in
the textbook and pressing Enter. There is an option to search for exact
names.

You may also insert a class by right click on a Node in D-Tree and
select it.

2) Select the relationship from the Relationship Dropdown box or use


Parent child relationship checkbox to indicate a special relationship
on an edge, which is Parent-Child class relationship.

When a View is generated, the tool will trace these relationships for
each instance of the parent node. Constraints may apply to the
relationship, which affects the row generation:
The Requires related instance checkbox flags that instance from the
related class must exist to generate a row in the view. Otherwise no
row is generated.
The Shared relationship checkbox indicates the children nodes share
the same relationship with the parent node but only one of the children
nodes may have instance for each parent instance. When generating
the view, one row is generated for this set of related classes.
If a class has both Shared relationship and Instance must exist
checked, Instance must exist is applied to the set containing that
class (an instance of one of the classes in the set must exist for the
row to be reported).

3) D-Tree node can be moved around within D-Tree window by dragging


and dropping
4) To remove a D-Tree node, use the remove button in D-Tree Window. The
whole branch will be removed.

3.2Set up View columns


View columns come from class (D-Tree node) properties. These columns may
come from multiple classes in the tree. In many cases, not all properties of
the classes in a D-Tree are needed in the view.
To include a class property in a view,

1) Select the Class in the D-Tree Window, a list of properties will show up
below
2) Check the properties to include in the view. If you would like the
property name to show differently, set it in the Override Name textbox.

3.3Roll-up columns
Conceptually similar properties from sub-classes may merge into a single
column. In the above example, the value property in IfcQuantityArea is called
AreaValue while the value property in IfcQuantityLength is called
LengthValue. We can use rollup to merge them into a single column called
Value. We do the roll-up by setting the Roll-up Properties box Value:
LengthValue, AreaValue.
The format is described by the following grammar:
<start> -= <entry> | <entry> ; <start>
<entry> -= [target] : <properties>
<properties> -= [property] | [property] , <properties>

Where <start> is the start symbol, <entry> is symbol representing a columnvalue map, <properties> is a symbol representing the values to be used for a
column, [target] is the string specifying the name of the column to report the
values in, and [property] is the string that specifies the property that can be
mapped to this column. Note that [property] must be the actual name of the
property, not the property label. If more than one value is found for the given
column, only one of them is reported.

3.4Custom Columns
i-model View Builder allows adding calculated columns into a view. This is
done on the Custom Columns tab. Custom columns value depends on the
values of other columns.
To add a custom,
1) Click New button on the Custom Columns tab. A dialogue shows up
for the column name.
2) Select the column from the list and edit the expression. For the
expressions format and supported operations, see
http://msdn.microsot.com/enus/library/system.data.datacolumn.expression.aspx.

Calculate After Pivot affects whether the expression is calculated before


applying a pivot or unpivot operation or after.
Checking the Include Time Stamp Column will include a special column with
the name given in the text box. The value of this column is set automatically
to be the time at which the query was run. The time stamp column is
generated before pivot.

3.5Pivot columns
Pivot operation transposes properties like name/value pairs automatically into
columns. A typical use of Pivot columns is the dynamic properties defined in
IFC model.
Four attributes are needed to make up a Pivot definition:

Row ID, which defines ID used for a row. For example, Name in IfcSpace
in the above sample.
Pivot Column Name, which defines where we can find the names of
dynamic properties. For example, Name in IfcPhysicalSimpleQuantity in
the above sample.
Pivot Column Value, which defines where we can find the values of
dynamic properties. For example, AreaValue if IfcQuantityArea or
LengthValue in IfcQuantityLength.
Pivot Value Operation, which defines how we deal with the values of a
dynamic property. The operations can be: Sum, Average, Count, Min,
Max, etc.

These attributes are set through the following UI.

i-model View Builder automatically list all the potential headers find in the
current i-model and you may use a different column name for it. You can do
this by setting the Override Name box.

3.6Un-pivot Columns
Un-pivot operation transposes properties from columns to rows as
name/value pairs. The operation is defined on Unpivot Tab.

1) Check to select columns to un-pivot.


2) Specify the column name of label of the label-value pair to create in
Label Column Name.
3) Specify the column name of value of the label-value pair to create in
Value Column Name.
4) Customize the value of name using Override Name.
The Enable Unpivot checkbox needs to be checked for the unpivot
operation to be run. If the Do not expand if null checkbox is checked,
headers that contain null are not unpivoted; they are simply not reported.
Un-pivot is always applied after the pivot if both options are enabled.

Preview Result

Preview tab shows the data of current selected table in the view from the
loaded i-model.

Deploy i-model view for ODBC Access

Bentley i-model View could be exposed through i-model ODBC driver simply
by dropping the View definition file under Bentley ODBC application data
folder. On Windows 7 the folder is usually:
C:\ProgramData\Bentley\DgnODBCDriverWinx64\Query\view for 64 bit ODBC
driver.
The following example shows that COBie View is available along with IFC
classes and i-model geometry classes when an IFC i-model is opened through
ODBC in Excel.

You might also like