BIMDISPLAY

Concept Link IconSee also Concept Link IconExample

BIM control management, including model loading, preset handling and object property retrieval.

WebVue support - No. Returns an unsuccessful code if used in this context.

Mode Mnemonic Syntax WebVue support
1 LOADIFC 1 No
2 SETCOLOR 2 No
19 SETCOLORBYNAME 3 No
20 SETCOLORBYINDEX 4 No
3 RESETCOLOR 5 No
4 ZOOMOBJECT 6 No
5 SETOPACITY 7 No
6 SHOWOBJECTBYTYPE 8 No
7 SHOWOBJECT 9 No
11 ADDPRESET 10 No
9 ADDCUTPLANESETPRESET 11 No
10 ADDCAMERASETPRESET 12 No
8 GOTOPRESET 10 No
12 SAVEPRESETS 13 No
13 LOADPRESETS 14 No
14 GETPRESETCOUNT 15 No
15 GETPRESETNAME 16 No
16 REMOVEPRESET 10 No
18 GETIFCPROPERTY 17 No
17 GETIFCPROPERTIES 18 No
21 OPENPROPERTIESWINDOW 19 No
22 GETOBJECTCOUNT 5 No

Arguments common to more than one mode

Argument Meaning
Window The name of the window that contains the BIM control. Type STR.
Branch The branch (if any) of the window. Use "*" to indicate the current branch of the program. Type STR.
Identity The identity of the BIM control within the specified window. Type STR.
Show Flag to show (1) or hide (0) Ifc objects. Type INTEGER.
PresetType

The type of preset. Type INTEGER.

0 - Camera and cut plane position
1 - Cut plane position only
2 - Camera position only

PresetName The name of a preset. Type STR.
PresetFilename The name and path of an Xml file where preset configuration is stored. Type STR.
IfcLabelValue An Ifc object identifier under the form of the value of the property IfcLabel. Type INTEGER.
BlinkingTimer

The blinking rate in milliseconds. Type INTEGER.
This argument is taken into account only if the optional arguments for the alternate color are set.
The value must be a multiple of 500 ms. If not, it is automatically rounded up to a multiple of 500 ms at run-time.
For example, use 2000 for a color blinking every 2 seconds. The value 800 will be rounded up to 1000 and color will be swapped every 1 second.

How to identify an Ifc object

How to identify an Ifc object in an unambiguous manner varies depending on how the model was designed and the tool used to design it.
To accommodate the variations you may encounter, all modes of the instruction BIMDISPLAY to which you need to pass an Ifc object Id have the following arguments:

Argument Meaning
ObjectIdType

Define by which property the Ifc object is identified. Type INTEGER.
1 - IfcLabel - The Ifc property Label is used as object identifier
2 - GlobaIId - The Ifc property GlobalId is used as object identifier
3 - Name - The Ifc property Name is used as object identifier
4 - Reserved for future use
5 - CustomProperty - A custom Ifc property is used as object identifier, the name of the property is passed with the argument PropertyName
6 - Reserved for future use

PropertyName

When ObjectIdType is set to CustomProperty, the value of the argument PropertyName is the name of the property to be used to identify an object. Type STR.

PropertyValue

Matching criteria for the value of the property used to identify an object. Type STR.

For example, if you set ObjectIdType to 5 (custom property), set the argument PropertyName to the value "Reference" and the argument PropertyValue to the value "TL 10", the action will be performed on all Ifc objects for which the value of the property "Reference" is equal to "TL 10".

Syntax 1

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, IfcFilename[, ConfigFilename]);

Return type: LONG.

Argument

Meaning

IfcFilename The name of a .Ifc file. Type STR.
ConfigFilename The name of a .dat configuration file associated to the BIM model for storing configuration of animations. Type STR.

Execution

Mode

Mnemonic

Action

1 LOADIFC Load the model stored in the file IfcFile in the specified BIM control and, optionally, the associated configuration file ConfigFilename.
The path can be absolute or relative. If a relative path is specified, it is relative to the project's BIM folder.
Return: 1 if successful, else 0.

Syntax 2

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, ObjectIdType, PropertyName, PropertyValue, Red, Green, Blue, Opacity [, Red2, Green2, Blue2, Opacity2[, BlinkingTimer]]);

Return type: LONG.

Argument

Meaning

Red Red component, range 0 to 255. Type INTEGER.
Green Green component, range 0 to 255. Type INTEGER.
Blue Blue component, range 0 to 255. Type INTEGER.
Opacity Opacity, range 0 to 100. Type INTEGER.
Red2 Red component for the blinking color, 0 to 255. Type INTEGER.
Green2 Green component for the blinking color, 0 to 255. Type INTEGER.
Blue2 Blue component for the blinking color, 0 to 255. Type INTEGER.
Opacity2 Opacity for the blinking color, range 0 to 100. Type INTEGER.

Execution

Mode Mnemonic Action
2 SETCOLOR Color the Ifc objects matching the selection criteria with the specified color.
Return: 1 if successful, else 0.

This instruction can be useful to animate a large set of objects that belong together. For example to highlight a site, a floor or a facade as part of the user navigation in mimics.
Using this instruction to manage color animation on individual objects is strongly discouraged. We recommend defining animations with the BIM control configuration editor instead.

Syntax 3

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, ObjectIdType, PropertyName, PropertyValue, ColorName, Opacity[[, Color2Name, Opacity2[, BlinkingTimer]]);

Return type: LONG.

Argument Meaning
ColorName A named color. See the table at the end of this topic for a list of named colors. Type STR.
Opacity Opacity, range 0 to 100. Type INTEGER.
Color2Name A named color for the blinking color. See the table at the end of this topic for a list of named colors. Type STR.
Opacity2 Opacity for the blinking color, range 0 to 100. Type INTEGER.

Execution

Mode Mnemonic Action

19

SETCOLORBYNAME

Color the Ifc objects matching the selection criteria with the specified named color.
Return: 1 if successful, else 0.

This instruction can be useful to animate a large set of objects that belong together. For example to highlight a site, a floor or a facade as part of the user navigation in mimics.
Using this instruction to manage color animation on individual objects is strongly discouraged. We recommend defining animations with the BIM control configuration editor instead.

Syntax 4

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, ObjectIdType, PropertyName, PropertyValue, ColorIndex, Opacity);

Return type: LONG.

Argument Meaning
ColorIndex Id of an indexed color within the color palette. Type INTEGER.
Opacity Opacity, range 0 to 100. Type INTEGER.
If the ColorIndex corresponds to a blinking color, the Opacity value is used for both the color and the blinking color.

Execution

Mode Mnemonic Action

20

SETCOLORBYINDEX

Color the Ifc objects matching the selection criteria with the specified indexed color.
Return: 1 if successful, else 0.

This instruction can be useful to animate a large set of objects that belong together. For example to highlight a site, a floor or a facade as part of the user navigation in mimics.
Using this instruction to manage color animation on individual objects is strongly discouraged. We recommend defining animations with the BIM control configuration editor instead.

Syntax 5

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, ObjectIdType, PropertyName, PropertyValue);

Return type: LONG.

Execution

Mode Mnemonic Action

3

RESETCOLOR

Remove the coloring from all Ifc objects matching the selection criteria.
Return: 1 if successful, else 0.
22 GETOBJECTCOUNT

Returns the number of Ifc objets matching the selection criteria.

Return: A number of Ifc objects or -1 if the ObjectIdType is invalid.

Syntax 6

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, IfcLabelValue[, SelectObject[, ChangeModelOpacity]]);

Return type: LONG.

Argument Meaning
SelectObject If set to 1, the object will be selected. Default 0. Type INTEGER.
ChangeModelOpacity If set to 1, the opacity of the model will be set to a low level allowing the user to see through 3D elements and visualize the object the camera has zoomed on. Default 0. Type INTEGER.

Execution

Mode Mnemonic Action

4

ZOOMOBJECT

Zoom on the Ifc object which IfcLabel property value matches IfcLabel, select it and change the model opacity according to the SelectObject and ChangeModelOpacity arguments.
Return: 1 if successful, else 0.

Syntax 7

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, Opacity);

Return type: LONG.

Argument Meaning
Opacity Opacity, range 0 to 100. Type INTEGER.

Execution

Mode Mnemonic Action

5

SETOPACITY

Set the opacity of the model as a percentage.
Return: 1 if successful, else 0.

Syntax 8

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, IfcTypeValue, Show);

Return type: LONG.

Argument Meaning
IfcTypeValue The value of the Ifc property Type to match. Type STR.

Execution

Mode Mnemonic Action

6

SHOWOBJECTBYTYPE

Show or hide all objects of the specified IfcTypeValue.
Return: 1 if successful, else 0.

Syntax 9

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, ObjectIdType, PropertyName, PropertyValue, Show);

Return type: LONG.

Execution

Mode Mnemonic Action

7

SHOWOBJECT

Show or hide the Ifc objects matching the selection criteria.
Return: 1 if successful, else 0.

Syntax 10

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, PresetName[, PresetType]);

Return type: LONG

Execution

Mode Mnemonic Action
11 ADDPRESET

Adds the current scene as a new preset named PresetName, as a camera and / or cut plane position according to PresetType.
Use the mode SAVEPRESETS if you want any newly added preset to be saved permanently.
Return: 1 if successful, else 0.

8 GOTOPRESET

Call the preset PresetName, changing the camera and / or cut plane position according to PresetType.
As well as any user-defined presets, there are eight predefined camera presets that can be used. The corresponding string constants are:

"LEFT"

"RIGHT"

"UP"

"DOWN"

"FRONT"

"BACK"

"UNCUT"

"DEFAULT"

Return: 1 if successful, else 0.

16 REMOVEPRESET Remove the preset named PresetName.
Use the mode SAVEPRESETS if you want any newly removed preset to be removed permanently.
Return: 1 if successful, else 0.

Syntax 11

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, PresetName, X, Y, Z, VectX, VectY, VectZ);

Return type: LONG

Argument Meaning
X, Y, Z,
VectX, VectY, VectZ
The parameters that define a cut plane. Type INTEGER.
The X, Y and Z parameters specify the position of the cut plane.
The Vect parameters specify the vector that represent the cut plane orientation.

Execution

Mode Mnemonic Action
9 ADDCUTPLANESETPRESET Add a cut plane preset named PresetName using the supplied preset parameters.
Use the mode SAVEPRESETS if you want any newly added preset to be saved permanently.
Return: 1 if successful, else 0.

Syntax 12

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, PresetName, LookX, LookY, LookZ, UpX, UpY, UpZ, PosX, PosY, PosZ);

Return type: LONG

Argument Meaning
LookX, LookY, LookZ,
UpX, UpY, UpZ,
PosX, PosY, PosZ

The parameters that define a camera position. Type INTEGER.
The Look parameters are vectors that represent the direction of the camera’s field of view.
The Up parameters are vectors that represent the upward direction in the scene projection.
The Pos parameters are points that specify the position of the camera.

Execution

Mode Mnemonic Action
10 ADDCAMERASETPRESET Add a camera preset named PresetName using the supplied parameters.
Use the mode SAVEPRESETS if you want any newly added preset to be saved permanently.
Return: 1 if successful, else 0.

Syntax 13

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, PresetFilename);

Return type: LONG

Execution

Mode Mnemonic Action
12 SAVEPRESETS Save the presets in the PresetFilename Xml file. If a relative path is specified, it is relative to the project's BIM folder.
Return: 1 if successful, else 0.

Syntax 14

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, PresetFilename[, LoadingMode]);

Return type: LONG

Argument Meaning
LoadingMode The loading mode. Type INTEGER.
0 - The loaded presets replace all the previous presets .
1 - The loaded presets are added to the existing presets.

Execution

Mode Mnemonic Action
13 LOADPRESETS Load presets from the FileName Xml file. If a relative path is specified, it is relative to the project's BIM folder.
Return: 1 if successful, else 0.

Syntax 15

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity[, CountMode]);

Return type: LONG

Argument Meaning
CountMode The counting mode. Type INTEGER.
0 - Return the total number of presets. Cut plane presets, camera presets and also presets that are camera and cut plane position. Default.
1 - Return the number of cut plane presets. Presets that are camera position and cut plane position are included.
2 - Return the number of camera presets. Presets that are camera position and cut plane position are included.

Execution

Mode Mnemonic Action
14 GETPRESETCOUNT

Retrieve the number of presets as specified by CountMode.

Return: Number of available presets if successful, else -1.

Syntax 16

StrVal = BIMDISPLAY(Mode, Window, Branch, Identity, Index[, PresetType]);

Return type: STR

Argument Meaning
Index Index in the list of presets. Starts at 0. Type INTEGER.

Execution

Mode Mnemonic Action
15 GETPRESETNAME

Get the preset name corresponding to the specified preset number Index in the list of presets of type PresetType.
Return: Preset name if successful, else an empty string.

Syntax 17

StrVal = BIMDISPLAY(Mode, Window, Branch, Identity, IfcLabelValue, PropertyName);

Return type: STR

Execution

Mode Mnemonic Action
18 GETIFCPROPERTY Get the value of the property PropertyName for the Ifc object which IfcLabel property value matches IfcLabelValue.
Return: The value of the property if successful, else an empty string.

Syntax 18

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity, ObjectIdType, PropertyName, PropertyValue[, XmlFilename]);

Return type: LONG

Argument Meaning
XmlFilename The name of an Xml file. Optional. Type STR.
The path can be absolute or relative. If a relative path is specified, it is relative to the project's BIM folder.

Execution

Mode Mnemonic Action
17 GETIFCPROPERTIES Get all the properties for the Ifc objects matching the selection criteria in an Xml format and load it to a namespace or generate an Xml file if Filename is provided.
The namespace created in memory is: <Branch>.<Window>.<Identity>
Return: 1 if successful, else 0.

Syntax 19

LongVal = BIMDISPLAY(Mode, Window, Branch, Identity);

Return type: LONG

Execution

Mode Mnemonic Action
21 OPENPROPERTIESWINDOW Open the Ifc properties window for the BIM control specified by its Window, Branch and Identity.

Return: 1 if successful, else 0.

Named colors

For a table of named colors click here. ClosedShow picture
BIM Display Control colors