Skip to content

AutoCad-DXF

Many CAD software packages are capable of exporting DXF files enabling to import numerous geometry data to CadnaA. With this geometry import, however, other object parameters will not be imported. If necessary, this requires a second step using the ODBC database interface (see Database Import (ODBC & XLSX)).

To ensure proper interpretation of the DXF data the following points shall be respected:

  • Use for each acoustical object type a separate layer.
  • Prior to export of the DXF file, delete all elements from the drawing not required for the CadnaA model.
  • Point objects (e.g. point sources, receivers) are exported with xyz coordinates. Upon import, CadnaA uses the z coordinate as absolute heights.
  • For three-dimensional objects the z coordinate of each point refers to the absolute height of the object’s top edge.
  • Save open lines such as roads, railways, line sources etc. as open polygon lines.
  • With roads, just the road’s axis (centre line) can be used. When the axis of each track is saved in the DXF-file as polygon, CadnaA will generate several parallel roads.

The DXF import filter ill handle some of the individual inputs made by CAD users. For example, CadnaA requires a closed polygon in order to interpret a polygon as a building. It will, therefore, assume a building to be a closed polygon, although its walls in the CAD system, are represented by individual lines with identical first and last points. If all those objects are a single layer these polygons will be imported as buildings.

Block saving is also supported by the CadnaA DXF format and the objects are processed accordingly.

Imported DXF object types

DXF files (ASCII and binary format) may contain numerous object types. The subsequent table lists all DXF object types CadnaA can import.

DXF Object Type Remarks
POINT -
LINE -
POLYLINE -
LWPOLYLINE -
NETS polygon-nets only (no spline-nets e.g.)
CIRCLE -
ARC -
TEXT restricted, e.g. no font information is read
INSERT block which may contain all of the above mentioned object types
3DFACE -

Not-Imported DXF object types

All other DXF object types cannot be imported into CadnaA, especially not:

  • SOLID, 3DSOLID
  • MTEXT
  • SPLINES

Furthermore, CadnaA does not deal with extrusion direction vectors other than (0 0 1).

Import Options

The „Options“ button offers the following features:

Dialog Options for DXF-Import

Layer Description with more than 23 Characters

With layer descriptions of more than 23 characters (restriction for the ID’s length, see Dialog Options Name, ID, INFO, ObjectTree, Master in the manual „Introduction to CadnaA“) the original description is written to the text variable ORG_LAYER (as long as the respective variable does not exist).

Use Object Heights for Polylines

With the activated option CadnaA adds the z-height and the object height from the DXF file, and defines this height as object height in CadnaA.

Example

In a CAD program the layer of an object is, e.g., defined by 15 m, the object height by 20 m. This is in CadnaA an absolute object height of 35 m.

Import Blocks as Points

With the activated option for the DXF-Import only, the "Insertion points" of the blocks will be imported.

Example

When height points in the CAD software are drawn as crossing lines and defined as block, CadnaA will import crosses instead of intersection points if the option is deactivated.

Import DXF-Handle as Name

This option enables to import identifiers, or the so-called „Handle“ to CadnaA. This is useful when this handle shall be used further in order to synchronize data from a database (see Database Import (ODBC & XLSX)). This requires to swap the object’s name and ID first (see dialog Modify Object|Action: Swap Name/ID, see manual „Introduction into CadnaA“). Subsequently, the object data can be imported via the ODBC-database connection.

Import DXF-Nets as Polys

So-called „nets“ (inter-meshing) can also be imported. By default, this option is activated.

Import 3D-Faces as Polys

So-called „3D-faces“ are several 3D polylines connected to each other. After activation of this option these are imported as polylines.

Polylines are always 3D (ignore Group 70)

With this option activated, polylines will always be imported as 3D-lines (i.e. including a height, if set). Thus, the value of group code 70 in the DXF-format will be ignored.

DXF Import with two heights

Following situation: you get a DXF file in which are saved buildings with two heights - the base point height and the object height. The base point height shall be imported for the digital terrain model (DTM) as contour lines. The following procedure is started with File|Import, format “AutoCad DXF“. The DXF file has to be imported twice with the below mentioned option settings.

1st import procedure

  • contour line - Layer: e.g. „xyz“ (or more layer names which include buildings, e.g. xyz|zyx|...)
  • auxiliary polygon - Layer: *Option „Use Object height for Polylines“ not activated
  • Close the dialog with OK and import the file.

1st Import: settings for import of terrain contours

2nd import procedure

  • Building - Layer: „xyz“
  • Contour lines - not imported!
  • Aux. Polygon - not imported!
  • activate the option „Use Object height for Polylines“
  • Close the dialog with OK and import the file.

2nd Import: settings for import of buildings

But there are probably too many contour lines imported with a slight height difference which is surely not useful. If necessary, thin the contour line model by deleting them or eliminate polygon points from the contour lines with the function Modify Objects, action „Simplify Geometry“ from the context menu (see manual "Introduction to CadnaA").

Purging of DXF Import Files

Frequently DXF import files contain objects on layers which are not required for modeling in CadnaA and should therefore be deleted. In the following, the procedure to delete objects on distinct DXF layers using the layer‘s name is explained. Since the layer(s) of these objects is not known initially, these objects have to be deleted after import.

  • Import the DXF file with all objects as auxiliary polygons.

By default, the layers used when importing DXF files correspond with those CadnaA uses on DXF export. Those layer names are shown on the dialog Options for DXF-Import. If the layers in the DXF file do not match with these assumed layers, all objects will be imported as auxiliary polygons (use the wildcard * in line „Auxiliary Polygon“ in column „Layer“).

Example

Path: Examples\Import\DXF\030561-1b.DXF

The following import file contains building polygons, a hatching inside those polygons, and lines representing property boundaries as auxiliary polygons. The building polygons can be converted into buildings after the hatching has been deleted. The property boundaries can be retained as auxiliary polygons.

  • Open the table Aux. Polygon on the menu Tables|Other Objects.
  • Move the table aside - if necessary - in order to not cover the objects in the graphics.
  • By scrolling down in the table, identify the layer name of the hatching lines to be deleted (in this example "KA-GEBAEUDESCHRAFFUR"). This layer name was copied on import to the ID of the auxiliary polygons.

  • Open the dialog of an auxiliary polygon by a double-click and copy the ID showing the layer name to the clipboard.
  • Click with the right mouse button in the „ID“ column and select the command Change Column from the context menu.
  • Add the „Replace Strings, Find what“ the copied ID.
  • Under „Replace with“ any multi-digit number (e.g. „2014“). This number should not match in any case with an already existent ID in the table.

This operation aims to replace the string in column ID by a numerical value in order to use it later on as a condition to delete these auxiliary polygons.

  • Click OK and confirm by „All“.

Consequently, the ID of the corresponding auxiliary polygons is replaced.

  • Close the table Aux. Polygon.
  • Click with the right mouse button in the white area on the graphics and select the command Modify Objects from the context menu.
  • Select the action „Delete“ for the object type „Aux. Polygon“.
  • Enable the „Condition“ option and enter as a condition: ID==2014

Note

In CadnaA, the double equal sign is used as an operator for testing correspondence of numerical values (see Chapter 5 - Operators & Functions in the manual „Attributes, Variables, and Keywords“).

  • Click OK and confirm by „All“.

Subsequently, the auxiliary polygons having the ID=2104 are deleted. Proceed in the same way in order to delete further objects from the imported data not required for modeling in CadnaA.