How to Edit Data Extraction Definition DXD Files in BricsCAD BIM
Quick answer: DXD (Data Extraction Definition) files are plain text files, created by DATAEXTRACTION and editable in any text editor like Notepad, used in the Creating Schedules procedure of the Project Browser, resolving the DXD reference on this hub’s Project Browser page. Since V22, DXD files use syntax version 2.0: a Paths section was added, and logical operations use infix notation ((EntityType=="3D Solid") and (Type=="BIM_COLUMN")) instead of the old prefix notation (AND (EntityType=="3D Solid") (Type=="BIM_COLUMN")).
File Structure
Lines starting with a semicolon (;) are comments and ignored when parsing; empty lines are ignored too. Section names are written in square brackets and are English case-insensitive (ECI) strings. Worth flagging: the source states a DXD file “can contain 4 sections,” but actually lists five section names: Paths, Settings, Entity Types, Properties, and Filter.
The [Paths] Section
Lists the paths to search for drawing files:
$CurDwg: the current drawing.$CurProj: the current project.
The [Settings] Section
Controls behaviour via these parameters (ECI names, format ParameterName=value, value either 1 or 0, no spaces around the =):
ExtractFromBlocks: whether to include entities from blocks, at all nesting levels.ExtractFromXrefs: whether to include entities from external reference blocks.CountXrefs: whether Xrefs are counted at all.CombineEqualRows: whether to group equal rows in the output (adds a Count column showing how many equal rows were combined).IncludeNameColumn: whether the output includes a Name column indicating the source entity type (3D Solid, 3D Solid Ply, and so on).
The [Entity Types] Section
Lists entity types to process, one of four line formats per line:
EntityType | DisplayEntityType:EntityTypeis the ECI entity type name (Circle, AttributeDefinition, and so on), mandatory.DisplayEntityTypeis an optional custom string shown in the DATAEXTRACTION dialog and output table.Block | BlockName | DisplayBlockName:Blockis the predefined keyword;BlockNameis the case-insensitive block name to process, including Xrefs and MInserts;DisplayBlockNameis optional, working the same asDisplayEntityType.Block | *: processes every block; if present, other block lines in this section are ignored (narrow the result with the Filter section instead).*: processes every entity type and block; other lines in this section are ignored (narrow the result with the Filter section instead).
The [Properties] Section
Lists properties to include in the output, one of five line formats per line. Property names generally contain no spaces, except coordinate properties, where the coordinate letter (X, Y, or Z) is separated from the general property name by a single space.
EntityPropertyName | DisplayEntityPropertyName | ValueOutputFormat:EntityPropertyNameis the ECI property name (Lineweight, Color, “Center Y,” and so on), mandatory;DisplayEntityPropertyNameis an optional custom name (defaults toEntityPropertyName);ValueOutputFormatformats the output, using the same syntax as field formatting.Attribute | AttributeTagName | DisplayAttributeTagName | ValueOutputFormat:Attributeis the predefined keyword;AttributeTagNameis the ECI attribute tag name as stored in the drawing; the remaining fields work the same as above.Drawing | DrawingPropertyName | DisplayPropertyName | ValueOutputFormat:Drawingis the predefined keyword;DrawingPropertyNamemust be one of: Comments, DrawingRevisionNumber, FileAccessed, FileCreated, FileLastSavedBy, FileLocation, FileModified, FileName, FileSize, HyperlinkBase, Keywords, Subject, Title, or TotalEditingTime.Formula | EntityPropertyName | DisplayEntityPropertyName=FormulaExpression | ValueOutputFormat:Formulais the predefined keyword;EntityPropertyNameis a unique name for this formula item;DisplayEntityPropertyNameis optional (the=sign is mandatory regardless, even with it omitted);FormulaExpressionuses the same syntax as\AcExprformula fields, with constants like PI and functions like SIN, referencing properties as<DisplayPropertyName>in angle brackets. For example,=2 * PI * <Radius>calculates a circle’s circumference.BlockView | BlockViewPropertyName | DisplayBlockViewPropertyName | BlockViewOptions:BlockViewis the predefined keyword;BlockViewPropertyNameis a unique name;DisplayBlockViewPropertyName, unlike the other formats above, cannot be omitted here.BlockViewOptionsfollows the formatViewType;DwgPath;SectionName:ViewTypeis Front, Top, Left, or Right (mandatory);DwgPathis a path to a DWG file, optionally relative to the DXD file (can be omitted);SectionNamenames the section to pull section settings from for the block view (can be omitted). IfDwgPathorSectionNameare omitted or not found, default settings apply. Example:BlockView|BlockViewProperty1|Elevation symbol|Front;../Sections/_SectionSettings.dwg;_BlockViewSettingsSection.
* on its own includes every entity property; all other lines in the section are ignored except Drawing and Formula lines.
An empty field search uses a literal space character (" ").
The [Filter] Section
Relational operators:
| Operator | Meaning |
|---|---|
== |
Equal to |
!= |
Not equal to |
< |
Less than |
> |
Greater than |
<= |
Less than or equal to |
>= |
Greater than or equal to |
Relational expressions are enclosed in (); AND/OR logical operators are case-insensitive and use infix notation. Tokens can be separated by any number of spaces (including zero), except right at the start of a logical expression, for example: ( Layer == "MyLayer" ) and (Thickness<=3). Expressions can split across multiple lines without breaking individual tokens. Use the EntityPropertyName, not the DisplayEntityPropertyName, to refer to properties. Comment lines with ;, and enclose string values in double quotation marks.
For example, (Type == BIM_WINDOW) or (Type == BIM_DOOR) extracts only BIM entities classified as windows or doors (see BIMCLASSIFY for more on BIM entity types).
A filter expression can be a single relational expression, or several grouped by logical operators, for example: ((0) and ((1) or (2))) or ((3) and (4) and (5)) or (6), where (0) through (6) are relational expressions like (Radius >= 3).
Frequently Asked Questions
What changed in DXD file syntax starting with BricsCAD V22? The Paths section was added, and logical operations switched from prefix notation to infix notation.
How do I reference a property inside a Filter section expression? Use its EntityPropertyName, not its DisplayEntityPropertyName.
What’s mandatory in a Formula line’s DisplayEntityPropertyName field, even if I omit the name itself? The = sign must still be present, even when DisplayEntityPropertyName is left out.
Can I include entities from nested blocks and external references in a data extraction? Yes, control this with ExtractFromBlocks (all nesting levels) and ExtractFromXrefs in the Settings section.