My MicroStation–AutoCAD Translations Are a Mess!
Translation tips and tricks, part 2
By Rick DeWitt
As mentioned in my previous article on translations, the problems that can come from translating between MicroStation and AutoCAD are extensive.
Here are some more of the common problems that people have when translating files:
- Wrong level names in the output file.
- Incorrect colors, line styles, line style scale and line weight.
- The wrong fonts are used or the text doesn’t display correctly.
- Reference files are not handled correctly.
In order to prevent these problems, you have to understand the differences between the two programs (as discussed in the previous article) and you have to know what options to use during the translation process. This article continues explaining the various options you have when translating files and how to use these options to make your translations come out right.
Now, using the tools and options of the MicroStation V8 translators, I’m going to show you how to control things like levels, colors, line styles, line weights, fonts and reference files. In this article, I’ll take you through translating an AutoCAD file to a MicroStation V8 design file. If you are translating in the other direction, from MicroStation V8 format to AutoCAD, the options are controlled in much the same way.
First, open the AutoCAD file in MicroStation V8. Next, choose File | Save As… from the main MicroStation menu bar. Depending on whether you are using MicroStation or Windows-style “Save As…” dialog boxes, click the “Select Format To Save:” option button or the “Save as type:” drop down menu button and choose “MicroStation V8 DGN Files (*.dgn).” Now, click the [Options] button on the dialog box. You will find it right under the [Cancel] button.
In the “Save As V8 Options” dialog box that opens, you will see some “Remap” options as well as a “References” and “Filter” tab displayed.
MicroStation uses a comma separated value (CSV) file to store the remap settings you create and then uses them to control the output during the translation process. The three icons to the right of the “CSV File:” field allow you to “Open”, “Edit” or “Create” a remapping CSV file. To see how this works, let’s start by selecting the “Create” icon. In the “Create CSV remapping file” dialog box, select a directory and type a filename that is appropriate for your needs. In this example, use “ACADtoV8.csv”. Once you do this, click the [Save] or [OK] button on the dialog box. In a moment, Microsoft Excel will start with your selected filename loaded. You will notice however, that the file extension is for an Excel spreadsheet rather than a CSV file. MicroStation automatically creates a spreadsheet so that instructions and other useful information regarding the remapping process can be easily presented to the users. Once you finish making changes to the spreadsheet and do a “Save”, the macros in the spreadsheet will automatically re-generate the CSV file that will be used by MicroStation’s translators.
AutoCAD Layers to MicroStation Levels
When the spreadsheet opens, you should be looking at the “Levels” worksheet. If not, you can change the active worksheet in Excel by clicking the “Levels” worksheet tab.
The “Levels” worksheet allows you to remap a source level or layer, designated in the “Level” column of the spreadsheet, to a different level or layer in one of the output columns. In the example shown in Figure 3, I have remapped the AutoCAD “DEFPOINTS” layer to “A-ANNO-NPLT” in the “V8OutputLevel” column. Just below the remapped level entry are some instructions labeled “Column Descriptions”. Each worksheet within the remapping spreadsheet contains its own instructions describing the information you can add in each column of that worksheet. The instructions also provide information on how to format the data you use to control the eventual translation remapping results.
Getting the Colors and Weights Right
The MicroStation translators, when saving an AutoCAD file to MicroStation, use the fixed AutoCAD color table in the output MicroStation file by default. While this maintains the original AutoCAD colors, not every MicroStation standard allows the use of this color table. If you need to use a different color table, then you will want to use the “Color” worksheet to remap the original AutoCAD colors to the best match in the required MicroStation color table. After the translation, you can attach the required color table in a batch process using Axiom’s Global File Changer.™ This ensures the colors will display correctly and meet your CAD standards.
Another issue that frequently causes difficulty in translation jobs is line weight. Because MicroStation users routinely use line weights to set the line thickness used for elements at plot time and AutoCAD users routinely use color for this same purpose, it is often necessary to map AutoCAD colors to MicroStation line weights during translation. This too can be accomplished with the remapping spreadsheet by using the “Weights” worksheet.
To do this, you need to use the optional qualification columns in the “Weights” worksheet. To show these optional columns, click the “Show Optional Columns” checkbox just above the “Weight” column in the “Weights” worksheet.
The optional columns add qualifiers that are considered along with the source value — “Weight” in this case — to determine which elements will receive the output line weight in the V8 MicroStation file. In the above example, we are mapping any AutoCAD element whose line weight is either 0.00mm (the default thickness in AutoCAD) or 0.15mm and has a “Color” of “1ac” (The “ac” stands for AutoCAD and the “1” is the color.) to a MicroStation line weight of 3. To map any color to a specific output line weight, just add it to the “Color” column for each line thickness that will be used in the source file.
Choosing Between Custom Line Styles and Standard Line Styles
The “LineStyles” worksheet is used to remap AutoCAD linetypes to MicroStation line styles. All AutoCAD linetypes behave like custom line styles in MicroStation where all the dashes and gaps are set to a specific length and display differently when you zoom in or out on the line. The MicroStation standard line styles (1–7) display the same no matter how far you zoom in or out from the element in a view. In most cases, MicroStation users want to use the standard line styles.
In Figure 5, I’ve remapped typical AutoCAD linetypes to standard MicroStation line styles (1–7). For standard line styles, no V8OutputScale value is needed as they always display the same. You can, if you wish, map AutoCAD linetypes to any MicroStation custom line style. When mapping to a custom line style, the default line style scale is 1.0. If you want to use a different scale, set the value in the “V8OutputScale” column.
Fixing those Pesky Fonts that Don’t Come Out Right
AutoCAD text supports the use of AutoCAD shape fonts (SHX) as well as true type fonts (TTF). MicroStation V8 supports both of those font types as well as MicroStation fonts. Most MicroStation standards still require the use of MicroStation fonts, so it is often necessary to map fonts as part of the translation.
Put the source file’s font name and font type in the first two columns and then update the V8OutputFont and V8OutputFontType with the font name and type you want to use as a replacement. In Figure 6, I’ve shown several standard AutoCAD fonts mapped to a MicroStation font that is comparable.
When you have all the mappings you want to use set in the spreadsheet, save the spreadsheet using File | Save. Saving the spreadsheet causes an internal macro to save all the mapping values to a CSV file of the same name. After saving the spreadsheet, you will see the categories un-grayed in the “Save As V8 Options” dialog box where you have set remap values with a checkbox next to each one. By checking or unchecking a checkbox, you can activate or not activate these remapping options. Check the checkbox for each category you want to activate during the translation.
Getting Reference Files to Translate Properly
Now that the “Remapping” options are set, click the “References” tab of the “Save As V8 Options” dialog.
When saving to V8 from AutoCAD, you have several options that control how reference files are translated. Knowing what these options do can save you tons of time.
You can translate the reference files along with the master files by turning on the “Convert Reference Files” checkbox and setting the menu buttons to [Retain] as shown in Figure 7. You can also merge the elements from reference files into the master file as individual elements or as a single cell for each reference.