Evaluated Columns in BricsCAD Mechanical BOM Tables Explained
Quick answer: Evaluated columns produce results based on other columns using user-defined expressions, two types are supported, formula and template columns. Worth flagging: this source’s own title reads “BricsCAD BIM,” despite being filed under BricsCAD Mechanical’s Bill of Materials section, the same kind of title mismatch caught several times throughout this hub’s earlier BIM section (there, most often with “BricsCAD Lite & Pro”).
Formula Columns
A Bill of Materials supports formula fields using the same syntax as DATAEXTRACTION, confirming the Formula line format covered exactly on this hub’s DXD file editing page. FormulaExpression follows \AcExpr formula field format, supporting constants (PI) and functions (SIN); reference a column as an operand using its title in angle brackets, for example =<Mass>/<Volume> calculates average density.
If a row lacks a value, a default substitutes in, specify one explicitly with <"ColumnTitle",DefaultValue> (the column title in double quotes); without a specified default, an empty value is used, usually producing an empty output.
A formula column can hold multiple expressions, each enclosed in sum brackets ({}), evaluated in order until the first one yields a non-empty result. Formulas can reference other formula columns (as long as they don’t form a loop), and in a hierarchical BOM, reference the parent row’s values by prefixing the column name with Parent:. They can also reference properties not explicitly added to the table, though any other formula columns referenced must exist in the table (invisible columns count as existing).
Distance, area, volume, and mass properties convert to their user-defined unit before use in a formula, falling back to the document unit if none is set; mass defaults to kilograms in metric documents and pounds in imperial ones.
Template Columns
Template columns combine several properties, plus custom text, into a single column, using Diesel-based expressions that must start with a $ sign; reference a column as an operand using its title in angle brackets.
The full Diesel function reference:
| Function | Description |
|---|---|
$(+, arg1, arg2[, ... , arg9]) |
Adds the provided arguments to the first one |
$(-, arg1, arg2[, ... , arg9]) |
Subtracts the provided arguments from the first one |
$(*, arg1, arg2[, ... , arg9]) |
Multiplies the first argument by the provided arguments |
$(/, arg1, arg2[, ..., arg9]) |
Divides the first argument by the provided arguments |
$(=, arg1, arg2) |
Returns 1 if arg1 equals arg2, otherwise 0 (both must be numbers) |
$(<, arg1, arg2) |
Returns 1 if arg1 is less than arg2, otherwise 0 (numbers) |
$(>, arg1, arg2) |
Returns 1 if arg1 is greater than arg2, otherwise 0 (numbers) |
$(!=, arg1, arg2) |
Returns 1 if arg1 doesn’t equal arg2, otherwise 0 (numbers) |
$(<=, arg1, arg2) |
Returns 1 if arg1 is less than or equal to arg2, otherwise 0 (numbers) |
$(>=, arg1, arg2) |
Returns 1 if arg1 is greater than or equal to arg2, otherwise 0 (numbers) |
$(and, arg1, arg2[, ... , arg9]) |
Applies a bitwise AND to the arguments |
$(angtos, angle[, mode, precision]) |
Converts an angle to a string (mode: 0 degrees, 1 d/m/s, 2 grads, 3 radians) |
$(delim, delimiter_string) |
Inserts a smart delimiter, only added if the output on both sides of it is non-empty |
$(edtime, time, format) |
Formats a date per the given format string |
$(eq, arg1, arg2) |
Returns 1 if arg1 equals arg2, otherwise 0 (both must be text) |
$(eval, expression) |
Evaluates the given expression as a Diesel expression |
$(fix, value) |
Truncates a real value to an integer |
$(getvar, variable) |
Returns the value of the given system variable |
$(if, arg, then[, else]) |
Returns ‘then’ if ‘arg’ is non-zero, otherwise ‘else’ (or empty if omitted) |
$(index, position, comma_separated_string) |
Returns the substring at the given position in a comma-separated string |
$(nth, position, arg1[, arg2, ... , arg9]) |
Returns the argument at the given position |
$(or, arg1, arg2[, ..., arg9]) |
Applies a bitwise OR to the arguments |
$(rtos, value[, mode, precision]) |
Formats a value per the given mode and precision |
$(strlen, string) |
Returns a string’s length |
$(substr, string, start[, length]) |
Returns a substring starting at ‘start’ for ‘length’ characters (numbering starts at 1) |
$(upper, string) |
Converts a string to uppercase |
$(xor, arg1, arg2[, ... , arg9]) |
Applies a bitwise XOR to the arguments |
A template column can also hold multiple expressions, each enclosed in sum brackets ({}), evaluated in order until the first non-empty result is used. Templates can reference other evaluated columns (without forming a loop), reference parent row values in a hierarchical BOM with Parent:, and reference properties not explicitly added to the table, provided any other evaluated columns referenced actually exist in it (invisible columns count). Use \n for a line break.
Example, combining PartNumber, Width, Height, and Length properties (note: the source itself contains a typo here, “Lenght” instead of “Length,” preserved as written since it reflects the actual source):
${<PartNumber>$(delim," X ")<Width>$(delim," X ")<Height>$(delim," X ")<Lenght>}
The Expression Configurator
Available in the Bill of Materials Manager panel, this dialog sets the column’s title and unit, edits its expression with syntax highlighting and autocompletion, and previews the resulting BOM table. For template columns specifically, its Template section makes it easy to insert, move, and delete properties, delimiters, and custom text.
Frequently Asked Questions
What happens if a formula column references a value that’s missing for a particular row? A default value substitutes in, specify one with <"ColumnTitle",DefaultValue>, or it falls back to an empty value (usually producing empty output) if no default is given.
Can a template column combine text and multiple properties into one cell? Yes, that’s exactly its purpose, reference each property with its title in angle brackets, and use $(delim, ...) to insert separators only where needed.
Do mass values in a formula automatically convert to the right unit system? Yes, mass properties convert to the user-defined unit if set, or the document unit otherwise, defaulting to kilograms in metric documents and pounds in imperial ones.
Can an evaluated column reference values from a parent row in a hierarchical BOM? Yes, prefix the column name with Parent: in either a formula or template column expression.