Editing data extraction definition (.dxd) files
- The Paths section has been added.
- Logical operations use infix notation: (EntityType=="3D Solid") and (Type=="BIM_COLUMN") instead of prefix notation: AND (EntityType=="3D Solid") (Type=="BIM_COLUMN")
DXD (Data Extraction Definition ) files are plain text files. You can edit DXD files created by the DATAEXTRACTION command using a text editor such as MS Notepad and use them in the Creating Schedules procedure in the Project Browser.
Lines starting with semicolon (;) are comments and ignored on parsing. Empty lines are ignored as well.
The file can contain 4 sections, each section name is written between square brackets, section names are English case-insensitive (ECI) strings. The sections are:
- Paths
- Settings
- Entity Types
- Properties
- Filter
The Paths section
Lists the paths to be searched for drawing files.
$CurDwg: current drawing
$CurProj: current project
The [Settings] section
The section contains values of the following parameters which control the behavior:
- ExtractFromBlocks - whether to take entities from blocks into account, considering all nesting levels.
- ExtractFromXrefs - whether to take entities from external reference blocks into account.
- CountXrefs - whether xrefs are taken into account at all.
- CombineEqualRows - whether to group equal rows in the output table; if yes, then the Count column is added, which indicates how many equal data rows are included.
- IncludeNameColumn - whether the output includes the Name column. The Name column indicates the source entity type: 3D Solid, 3D Solid Ply, ...
Parameter names are ECI strings. The format is:
ParameterName=value,
The value is either 1 or 0. No spaces should be written around the equal (=) character.
The [Entity Types] section
This section contains list of entity types which will be processed. The format of each line can be one of the following types:
EntityType | DisplayEntityType
-
EntityType is the ECI entity type name, such as Circle or AttributeDefinition. This is the mandatory part of the line.
-
DisplayEntityType is optional and can be any character string including spaces in any language. If present, this string appears in the DATAEXTRACTION dialog and in the output table.
Block | BlockName | DisplayBlockName
-
Block is the predefined ECI word, and BlockName is case-insensitive name of the block to be processed, including xRefs and MInsert(s).
-
DisplayBlockName is optional and has the same meaning and format as DisplayEntityType.
Block | *
This is a variant of the previous format meaning that all blocks will be taken into account; if present, then all other lines regarding blocks in this section are ignored. You can use the Filter section to filter the content to be processed.
*
All entity types and blocks will be taken into account, all other lines in this section are ignored then. You can use the Filter section to filter the content to be processed.
The [Properties] section
This section contains a list of all properties to be included in the data extraction output. The format of each line can be one of the following types: Entity Property, Attribute, Drawing, Formula or Block View.
EntityPropertyName | DisplayEntityPropertyName | ValueOutputFormat
EntityPropertyName is the ECI name of entity property, e.g. Lineweight, Color, Center Y and so on. Note, all names do not contain spaces except those which represent coordinates of 2D or 3D points or vectors. In the last case, coordinate letters X, Y and Z should be separated by single space from the general property name.
EntityPropertyName is the mandatory part of the line, the remaining part is optional.-
DisplayEntityPropertyName is user-defined and can be in any string including spaces in any language. By default, it is equal to EntityPropertyName.
-
ValueOutputFormat is a string which is used to format the output. The syntax of the string is the same as in fields formatting.
Attribute | AttributeTagName | DisplayAttributeTagName | ValueOutputFormat
-
Attribute is the predefined ECI word.
-
AttributeTagName is the ECI attribute tag name as it is stored in the drawing.
-
DisplayAttributeTagName has the same meaning as for EntityPropertyName (see above).
-
ValueOutputFormat is a string which is used to format the output. The syntax of the string is the same as in fields formatting.
Drawing | DrawingPropertyName | DisplayPropertyName | ValueOutputFormat
-
Drawing is a predefined ECI word.
-
DrawingPropertyName is an ECI name, which can be one of the following:
- Comments
- DrawingRevisionNumber
- FileAccessed
- FileCreated
- FileLastSavedBy
- FileLocation
- FileModified
- FileName
- FileSize
- HyperlinkBase
- Keywords
- Subject
- Title
- TotalEditingTime
- DisplayPropertyName has the same meaning for EntityPropertyName (see above).
- ValueOutputFormat is a string which is used to format the output. The syntax of the string is the same as in fields formatting.
Formula | EntityPropertyName | DisplayEntityPropertyName=FormulaExpression | ValueOutputFormat
-
Formula is a predefined ECI word.
-
EntityPropertyName is a unique name for this formula item.
-
DisplayEntityPropertyName is an optional output name of the property, if it is omitted, then EntityPropertyName is used as the table column title.
-
= is a mandatory sign, which must exist even if DisplayEntityPropertyName is omitted.
FormulaExpression is the expression in format as in \AcExpr formula fields, which can contain constants such as PI or functions such as SIN (see Using Expressions). An operand in an expression can be a DisplayPropertyName enclosed in arrow brackets (<>).
For instance: =2 * PI * <Radius> calculates the circumference of a circle.-
ValueOutputFormat is a string which is used to format the output. The syntax of the string is the same as in fields formatting.
BlockView | BlockViewPropertyName | DisplayBlockViewPropertyName | BlockViewOptions
-
BlockView is a predefined ECI word
-
BlockViewPropertyName is a unique name for this block view item
-
DisplayEntityPropertyName is the output name of the property; cannot be omitted
BlockViewOptions is a string in the following format:
ViewType;DwgPath;SectionName- ViewType is one of the following: Front, Top, Left or Right; cannot be omitted.
- DwgPath is path to dwg file, may be relative with respect to the dxd file; can be omitted.
- SectionName is the name of the section to extract the section settings from for the block view construction; can be omitted.
If DwgPath or SectionName are omitted or not found, default settings will be applied.
An example:
BlockView|BlockViewProperty1|Elevation symbol|Front;../Sections/_SectionSettings.dwg;_BlockViewSettingsSection
*
If present all entity properties are taken into account; all other lines in this section, except Drawing and Formula lines, are ignored.
The [Filter] section
Syntax description:
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 '()' brackets.
- Logical operators AND and OR are case-insensitive.
- Logical expressions use an infix notation.
- Tokens can be separated by zero or any number of spaces, except logical expression begin,
example:
( Layer == "MyLayer" ) and (Thickness<=3)
- Expressions can be split into any number of lines; tokens are not broken.
- Use the EntityPropertyName to refer to properties (not the DisplayEntityPropertyName).
- Lines can be commented with ';'.
- String values are enclosed in double quotation marks "".
(Type == BIM_WINDOW) or (Type == BIM_DOOR)
The result of the filter in the above example is that only BIM entities classified as windows or doors are included in the data extraction. See the BIMCLASSIFY command to learn more about BIM entity types.
The filter expression is either a single relational one or several ones grouped by logical operations.
Example:
((0) and ((1) or (2))) or ((3) and (4) and (5)) or (6)