Make Mine a DWG, Part 1

6 Dec, 2006 By: Scott MacKenzie

Step-by-step, here's how to translate your ArchiCAD files into AutoCAD files

What is the most requested CAD file format among consultants? My guess would be AutoCAD 2000. Yes, I know it's an unsupported version, and it drives me crazy, but many firms and institutions are slow to upgrade. Every major CAD or BIM package can translate its own drawing formats into AutoCAD's DWG file format. That's nice, but how good is that translation?  Well, it's only as good as you make it. Even if you're running a current version of AutoCAD, you still need to evaluate the files you saved down to earlier file formats.

If you (or someone else in your firm) haven't taken the time to evaluate the end DWG product you create, chances are you're leaving a big mess for your consultant to clean up. In this and future editions of AEC Tech News, I'll go over the most important tips for creating a good DWG file in ArchiCAD versions 9 and 10 for your clients and consultants.

Exporting to DWG from ArchiCAD

Translator File: To control the output of DWG files from ArchiCAD, you need to configure the DWG format options in the DWG-DXF Translation Setup Translator. From here you can customize and create your own translator files -- XML files that contain all the translation settings. Although it is possible to edit the translator file with an XML editor, you will want to do it in ArchiCAD. (Well, except for one thing, which I will cover later in this article.)

Save Options: The save options section covers the file version to be created, linked files (xrefs) and how to process paper space and model space. My preferred settings are shown below.

The Settings section of ArchiCAD's DWG-DXF Translation Setup Translator.

Template File: Along with the translator, you should set up an AutoCAD template drawing file. This file will contain all the exciting standards and drawing information that your clients and consultant incorporate into their drawings. All the layers and line types you want to have in your exported AutoCAD files must be inside this template drawing. 

It is a good idea to have a master AutoCAD file that has all the layers and line types that your clients or consultants need. You can take their master file and turn it into your DWG translator template, or you can import their stuff into your existing template using the Autodesk Design Center command (ADCENTER) in AutoCAD.

Every Project Should Have One: I suggest that you create a translator and translator template drawing for each project. Every project is different, and should not be unduly restrained by another project's standards. I'm a big proponent of CAD/BIM standards, but every project needs wiggle room.

Name the files using each project name (example: PROJNAME.XML and PROJNAME.DWG). You should have a Translators folder inside each project specifically for housing translators and their support files.

Attribute Mapping

The Attributes section of the translator is where most of the magic happens. In order to achieve the greatest control over your output, you will need to utilize each section here.

Pen-Based Layer Names:  I prefer to use the "Layer of Declared Pen Number" method. Some feel it is unnecessary to use this option because the layer name conversion option does a good job of mapping layers. But the Pen to Layer option is the only way I know of to separate out the door, window and object components onto their own layers in AutoCAD. Doors and windows cannot be placed on their own layers in ArchiCAD; they are relegated to the layer of their host walls. Objects can contain multiple pens, but not multiple layers.

You can set a destination layer for doors and windows in AutoCAD's Custom Layers section under Layers/Methods, but that doesn't accommodate the frame and leaf of a door, or the different parts of a window. This can be very important to the recipient of your exported files. The Pen to Layer function will put these components onto their own layers for you. Hail the power of the pen!

The Methods subsection of the Layers section.

The attribute assignments you create will sort according to the order in which they were entered. Unless you have all your pens figured out when you start your project, you will make your pen assignments as your project evolves, and your pens will be out of order.

Pen to Layer assignments sort themselves by order of entry.

This is no problem if you only have a handful of pens to map, but if you are like me, you'll want them to sort by pen number.

If you want to control the way your attribute mappings display, you will have to edit the translator file directly. The example below is the pen mapping section of the raw XML code copied from the translator used above. I use Notepad or Microsoft Script Editor to edit XML files. (Script Editor comes free with Microsoft Office -- that's the main reason I like it. I do my HTML pages with it too.)

<PenLayer items="7">
<Item ACPen="1" ACADLayer="A-Wall"/>
<Item ACPen="2" ACADLayer="A-Wall-Int"/>
<Item ACPen="12" ACADLayer="A-Glaz"/>
<Item ACPen="3" ACADLayer="A-Wall-Ext"/>
<Item ACPen="211" ACADLayer="A-Anno-Text"/>
<Item ACPen="3" ACADLayer="A-Wall-Abv"/>
<Item ACPen="104" ACADLayer="A-Flor-Patt"/>

Manually sort the "<Item ACPen lines" in the "<PenLayer" section so the pens are in order. If you add or remove any lines, you must change the number in the <PenLayer items="7"> line accordingly. Use this method if you need to cover a wide range of pen numbers; it can also be applied to the other mapping sections, such as line types and fonts.

Duplicate pens are not flagged. As the examples above show, you can repeat pen numbers. (Pen  number 3 was repeated.) Sorting your pens this way will help you remove the duplicates. The example below shows the pens in ascending order, with both the duplicate pen removed and the PenLayer items quantity removed.

<PenLayer items="6">
<Item ACPen="1" ACADLayer="A-Wall"/>
<Item ACPen="2" ACADLayer="A-Wall-Int"/>
<Item ACPen="3" ACADLayer="A-Wall-Ext"/>
<Item ACPen="12" ACADLayer="A-Glaz"/>
<Item ACPen="104" ACADLayer="A-Flor-Patt"/>
<Item ACPen="211" ACADLayer="A-Anno-Text"/>

Pens sorted and culled.

Layers Name Conversion: This is pretty self-explanatory: Map your ArchiCAD layer to a different layer name in AutoCAD.

Pens and Colors: Check the box for Set all Elements' Colors and Lineweights to BYLAYER. This will allow for greater control of the drawings elements in AutoCAD.

Line types: Map your ArchiCAD linetypes into AutoCAD line types. This is very important to utilize. Every CAD/BIM package handles linetypes differently. The same linetype in one package may be named something different in another. For example:  the "Double Dashed" line type in ArchiCAD is closest to "Center" in AutoCAD. I put together a quick little mapping table that you can reference; see below.

ArchiCAD Line Type AutoCAD Line Type
Solid LineContinuous
Dense Dotted Dot2
Dotted  Dot
Long DashedDashed
Dot & DashedDashdot2
Double Dashed Center2
Triple DashedPhantom2
Hidden Line Hidden

You can create your own set of ArchiCAD line types that match AutoCAD's in both name and appearance. Keep in mind, the linetype scale of the translated lines will be controlled by the scale settings assigned to the views, and the individual linetypes in ArchiCAD.
After you create your AutoCAD file, open it and check your work. Keep tweaking your translator system until you get it right.

Publisher View Sets

Drawings to be exported are easily controlled if they are in a parent folder (DWG-Out).

Create a view set in ArchiCAD just for your DWG creation. This saves your settings to automate your future DWG file exports.

  • Open the Organizer palette
  • Open the view map or layout book in the left pane
    • Layout book for whole sheets
    • View map for drawings without title blocks, such as drawings to be used as external reference files (xrefs)
  • Open the Publisher Sets in the right window
  • Create a new Publisher Set. Call it something like DWG Export.
  • Copy your views from the left pane into the publisher window.
  • Keep your publisher drawing views in a folder and configure your format options on that parent folder. Those settings will be applied to all the drawings under that folder. (Otherwise, you will need to select all the drawings individually.)

If you need to create DWG files to be used as xrefs, you should rename the drawing views. The view name is what controls the exported file name.  If a view name is "1. GROUND FLOOR" as shown above, then the file name will be "1. GROUND FLOOR.DWG." Rename the views in your Publisher view set according to the required file naming convention.

Good luck with this. In the next Scott Mackenzie edition of AEC Tech News (coming January 4, 2007), I'll have more tips for you. I'll go over how to fix corrupt DWG exports and how to clean up your files in AutoCAD.

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!