Zurück zum Anfang

Bomlink expressions and variables

Variable Prefixes

Variables can be accessed with or without prefixes. The following prefixes provide explicit access to different scopes.

Prefix Syntax Description Example
V. V.{VariableName} Explicitly references variables from the BomLinkVariableResolver V.MyCustomVariable
I. I.{FieldName} Explicitly references inventory/material fields I.Quantity, I.Price
M. M.{PropertyName} Explicitly references properties of the material source object (Entity, Beam, TslInstance, etc.) M.Length, M.Name, M.Width
P. P.{ProjectInfoProperty} Explicitly references ProjectInfo properties P.Number, P.Revision, P.Name

Variable Prefixes

Variables can be accessed with or without prefixes. The following prefixes provide explicit access to different scopes.

Prefix Syntax Description Example
V. V.{VariableName} Explicitly references variables from the BomLinkVariableResolver V.MyCustomVariable
I. I.{FieldName} Explicitly references inventory/material fields I.Quantity, I.Price
M. M.{PropertyName} Explicitly references properties of the material source object (Entity, Beam, TslInstance, etc.) M.Length, M.Name, M.Width
P. P.{ProjectInfoProperty} Explicitly references ProjectInfo properties P.Number, P.Revision, P.Name

Built-in Variables

Variable Type Description Example Usage
RuleName String The name of the current rule being evaluated RuleName
RuleGroupName String The name of the group containing the current rule RuleGroupName
BeamType.{TypeName} String References BeamType enumeration values BeamType.Rafter, BeamType.Joist
AnalysedTool.{ToolName} String References AnalysedTool type names AnalysedTool.Saw, AnalysedTool.Drill
{ListName}.{ItemValue} String References items from user-defined lists in the active project MaterialList.Steel, ColorList.Red

Entity-Specific Properties

When the MaterialObject is an Entity, the following special properties are available.

Property Type Description Example Usage
IsLoose Boolean Indicates whether the entity is not attached to an Element IsLoose, M.IsLoose
Element Element References the parent Element of the entity Element.Name, M.Element.Width
Group Group References the first deliverable container group Group.Name, M.Group.Level1
FloorGroup Group References the deliverable floor group FloorGroup.Level1, FloorGroup.Level2
TypeName String Returns the type name of the object TypeName, M.TypeName

String Functions

Function Parameters Description Example
StartsWith searchIn, searchFor Checks if a string starts with another string (case-insensitive) StartsWith(Name,'Beam')
Contains searchIn, searchFor Checks if a string contains another string Contains(Description,'Steel')
Equals string1, string2 Compares two strings for equality Equals(Type,'Rafter')
Left text, length Extract characters from the start of a string Left(Name,5)
Right text, length Extract characters from the end of a string Right(Code,3)
Substring text, startIndex Extract substring starting at index Substring(Name,4)
Trim text Removes leading and trailing whitespace Trim(Description)
UCase text Converts string to uppercase UCase(Material)
LCase text Converts string to lowercase LCase(Type)
Concatenate / C multiple values Concatenates values into a single string C(Name,'-',Type)

Brauchen Sie Hilfe?

Sie können die gesuchte Antwort nicht finden? Keine Sorge, wir sind hier, um zu helfen!

Kontakt zum Support