DXF and DWG are two common file formats used to exchange information between different CAD and drawing programs. DXF is a semi-public standard promoted and controlled by Autodesk, Inc. DWG is a proprietary, closed format used by Autodesk for its products. Both DXF and DWG files should contain identical information. As of this writing, the most recent DXF/DWG version is version 14. VectorWorks reads versions 2.5 through 14, and writes versions 11 through 14.
Note: DXF and DWG files should contain the same information, and the same translator is used in VectorWorks for both. For the purposes of this document, "DXF" refers to any file in text (ASCII) format DXF, binary DXF, or DWG format.
DWG is a proprietary binary file format controlled by Autodesk, Inc. Autodesk does not publish a specification for it. It does publish specifications for both plain-text and binary versions of DXF. Both DXF and DWG are designed to support Autodesk's software products. Consequently, there is little support for the advanced features of other software packages and information is often lost in the translation process. Where this impacts you as a user of VectorWorks will be described below.
Despite being proprietary, and despite the fact that DXF and DWG files should contain the same information, many government and commercial contracts specify that the DWG format must be used for exchange of drawing information. As a result, DWG has become a de facto standard, and other companies wishing to compete with Autodesk are forced to reverse-engineer the file format. For more information about the DWG controversy, and for free related utilities and information, see the web site of The OpenDWG AllianceTM at http://www.opendwg.org/
Information Lost in Translation
Importing and exporting to DXF is not the same as saving to a VectorWorks file or opening one. It's a translation from one way of doing things to another, and information can get lost in the translation. Listed below are some of the things which DXF does differently, and which can introduce unwanted effects in the translated document.
Note: The DXF/DWG translator is constantly being improved, so be sure to check the VectorWorks release notes for up-to-date information about how different objects and attributes are translated.
There are some steps you can take to help ensure a satisfactory translation. The following procedure is recommended:
The DXF translator is being improved all the time, so check the release notes for up-to-date information about the DXF/DWG export process.
2. Save a copy of your file with a different name if you plan to do any modifications of it before exporting.
This will prevent you from accidentally overwriting your original VectorWorks file with one modified for DXF export.
3. Don't rely on colors. It's recommended that you map line weights to colors, so existing line colors will not be exported.
Similarly, fills may not export, and patterns will not export. Use only "paint" transfer mode for your layers (the default).
4. Set the class and layer visibility appropriately, and either a plan or a 3D view.
Keep in mind that the active layer and class count as "visible" regardless of their visibility settings. Gray classes and layers are not supported in DXF, so these will be exported as being normal visible layers. As a result, it would be a good idea to have your class settings on "show/snap/modify others" and your layer settings on at least "show others" so you can more clearly see what you will be exporting.
5. If you are able to see the exported file imported into another software package, print the document first in VectorWorks so you can compare the original with the translated document.
This will aid in identifying and correcting any problems, such as lines that are hidden in VectorWorks becoming visible in other packages due to the loss of object fills.
6. Check your drawing with both black and white backgrounds if you don't map line weights to colors.
If you have a white background and use a dark, but not black, line color, then people reading the file who use a black background may not be able to see the objects.
7. Set the 2D conversion resolution option to a low value if you are concerned about file size.
2. Choose appropriate export options, and export the document.
The DXF/DWG export dialog options are described below.
3. If you are not able to see what the exported file looks like when imported into the destination software package, import it back into VectorWorks so you can get an idea of what it will look like to the recipient.
Note: Do not change the file extension (.dxf or .dwg). Without the correct extension, many software packages will not be able to read the file. Do not export as binary DXF unless you know that the recipient will be able to read this format.
Note: If you compress the file before giving it to the recipient, make sure the recipient can read the compression format you used. Windows users prefer .zip format (make sure "MacBinary" is not being used). Mac users prefer .sea or .sit format. Unix users usually prefer .gz or .gzip format.
The DXF export dialog contains a variety of options to help your export you VectorWorks file retains its integrity in the DXF/DWG format.
You should normally only need to set the file format and version. The Plan view / 3D view option will default to whatever your document is set to when the dialog is opened. The other options are for advanced users who want to customize the export process
You have three options for the exported file format: DXF as plain text (or "ASCII"), DXF as a binary encoding, and DWG. One of the main differences between these is file size. Although individual files can vary, an uncompressed text DXF file will be larger than an uncompressed DWG file.
However, none of these file formats is optimized for size, and significant reductions to the file size can be made by using a compression utility. Compressed text DXF will be normally smaller than compressed DWG. Binary DXF generally falls between the two in both cases.
In addition to file size, you need to consider what formats other applications can support. Text DXF support is ubiquitous, but before exporting to binary DXF or to DWG you should make sure that the receiving party's software can read those formats. Since binary and text DXF both use the same .dxf extension, people that cannot read binary DXF might mistakenly think these files have become corrupted. When in doubt, export as text DXF.
Note: DXB is a simpler file format used by some third-party applications that do not support the full DXF or DWG file format. It is not the same as binary DXF, and you should not use .dxb as the extension for binary DXF files.VectorWorks does not support DXB.
For best results, export to the highest version that you know the receiving party's software can read. The latest versions of DXF/DWG have features similar to ones that have been in VectorWorks and can give you a truer visual translation, but not all software packages will be able to read the latest versions. When in doubt, export as version 12, which has widespread industry support.
This option will default to whatever your document was set to before bringing up the dialog. To export 3D objects, be sure to select 3D view.
Some software packages such as AutoCAD are not capable of rendering exported 3D surfaces that have more than 3 or 4 vertices per face. Triangulate to Preserve 3D Fills option will attempt to break up such faces into a set of triangles that can be properly rendered. The algorithm used works best on planar or nearly-planar surfaces, such as the top of an extruded circle. When in doubt, leave this option checked. Be aware that this will increase the size of the exported file and the time necessary to export it, and may result in unwanted lines in some cases.
Some software packages cannot handle exported groups and symbols. If you encounter such a problem, select Decompose 3D Objects to convert 3D symbols and groups to ungrouped objects. Do not select this option unless you know that you need to.
Mapping Line Weights to Colors
Not all objects in a DXF/DWG file are capable of supporting displayable line thicknesses. For example, circles and lines do not have a "line thickness" attribute, while a "polyline" object does.
The traditional method of specifying line sizes in a DXF/DWG file is to use a line color, with the thickness corresponding to each color being specified at plotting or printing time
We recommend that you choose to convert line weights to colors. After pressing the OK button, you will be prompted with a list of line weights found in your document and will be able to specify the colors that map to these line weights. When re-importing the file, the reverse process can be used to convert the colors back to line weights.
Converting VectorWorks classes to DXF/DWG layers
You should select this option unless you really intend to do otherwise. VectorWorks classes resemble DXF/DWG layers more than VectorWorks layers do. The main place where this is important is in the export of groups and symbols: in VectorWorks, the objects in groups and symbols can belong to different classes, but must be on the same layer. In a DXF/DWG file, the entities equivalent to VectorWorks's symbols and groups (known as "blocks" and "anonymous blocks") can be on different DXF/DWG layers. There is no concept in the DXF/DWG file equivalent to VectorWorks' layers.
Handling conflicting object visibilities
While VectorWorks has two ways to organize your drawing, by class and by layer, the DXF/DWG file format only has layers. The below description assumes that you are following the recommended path of exporting classes as layers. If you choose to export layers as layers, you will have equivalent options.
You have the option of whether or not to export invisible classes. If you choose to export to invisible layers, then the receiver of your document will get objects that are in invisible classes in your document, and will be able to see them by making the DXF/DWG layer visible. This is recommended, but if your invisible classes contain private information or if you wish to decrease the size of the exported file, you may wish to choose to not export these invisible objects.
Since invisible layers in the exported file are matched to invisible VectorWorks classes in the previous step, you need to decide what to do with objects that are on invisible VectorWorks layers. Choosing to make these objects visible may result in unexpected visual changes on the receiving end, so we recommend that you do not make these objects visible.
VectorWorks reads versions 2.5 through 14 of DWG and text and binary DXF. There are some steps you can take to help ensure a satisfactory translation. The following procedure is recommended:
1. Read the VectorWorks release notes.The DXF translator is being improved all the time, so check the release notes for up-to-date information about the DXF/DWG import process.
2. Read "Information Lost in Translation" for more information about the differences between DXF and VectorWorks concepts.
Importing a DXF or DWG file is a translation, and is not as simple as opening a document.
3. Communicate with the file originator. Find out the intended units, page size, and scale of the document, and the line weights intended for the colors used.
4. Create a blank document and set the drawing size.
If you know the units used in the DXF file, you can optionally set the units to match. Importing into a drawing that is not blank can produce unexpected results and is not recommended.
5. From the File menu, select Import and then DXF/DWG.
The Import DXF/DWG dialog appears.
6. Choose appropriate import options, and import the file.
The DXF/DWG import dialog options are described below.
Note: If results are unsatisfactory, you may need to import the file again (into a blank document) with different options selected.
Note: If part of the file appears to be missing, it might be the case that the originator of the file did not include externally referenced objects ("XREFs"). AutoCAD users can include the XREFs in the drawing with the XREF command.
The DXF Import dialog provides all the necessary options to import a DXF/DWG file with the maximum file integrity.
You should normally only need to set the units information in the first panel. The other options are primarily intended to allow advanced users to customize the import process. You may need to change the "Objects Parallel to XY Plane Are 2D" setting if imported 3D objects are distorted.
DXF or DWG file does not contain true units information. VectorWorks tries to guess the units setting, but you may need to adjust it. For example, if the guess in the edit boxes for a "decimal" drawing is 25.4 units = 1", indicating millimeters, but you know that the drawing was created with 1 unit = 1 meter, then you would need to change the edit box text to 1 unit = 1m. Type a unitless DXF number in the first box, and a number with units in the second box. (The units displayed in the second box are the same as your current VectorWorks document settings, but you may type other numbers as long as you put the appropriate units suffix on, such as "3 cm".)
Once you have determined the units above, you need to decide what VectorWorks scale to display the drawing at. If the drawing was saved correctly, the bounding box or "extents" of the drawing will be in the file, and VectorWorks will guess a scale based on this that will make the drawing fit to your current Drawing Area. If you want to import at a different scale, you can set the scale manually. If the scale is set incorrectly, the imported objects will be either too big or too small. If they are much too big, they will be deleted during the import process to avoid reducing drawing precision to unusable levels.
As noted earlier, DXF layers correspond more closely to classes in VectorWorks than they do to VectorWorks layers. Unless you have more than 256 layers in the DXF file, you should choose to import DXF layers as VectorWorks classes.
Objects Parallel to XY Plane Are 2D
This option attempts to separate the imported objects into the 2D and 3D realms of VectorWorks. Although several DXF entities are planar, they may be moved up or down in the Z direction. This option will convert any entities parallel to the XY plan to 2D objects. If you know that the file you are importing contains pure 3D information, then you should uncheck this option because larger object composed of several entities may have parts of themselves converted to 2D.
Multilines (or "mlines") are similar in some ways to walls in VectorWorks, in that they can have breaks that are "healed" and can be connected to other multilines. There are several significant differences between them and walls, but an option is provided to import multilines as walls. You should not choose this option unless you know that all multilines in the DXF file are intended to be walls.
"Attributes" in a DXF file are similar to linked text in VectorWorks, but there are differences which make it impossible to always import it as linked text. This option allows you to choose how to handle the importing of attributes. Regardless of this setting, record formats will be created based on the attributes found during import and imported blocks with attributes will have record formats attached.
"Preserve Document Look" is the default, and will unlink any text necessary and place it on the document as plain text. When information in the record format attached to a symbol is changed, the text on the drawing will not update.
"Stack Linked Text Below Symbols" will link all non-invisible text to symbols and list the text below the symbol. This text will be updated when the record format information is updated, but may not be placed where it was in the DXF file.
"Don't Display Linked Text" will delete all linked text. The information will only exist in the record formats.
Note: DXF does not have a concept equivalent to the VectorWorks record formats. VectorWorks groups sets of attributes into record formats if they have the same set of field names. For example, if two blocks (symbols) have attributes with field names of "color" and "part number", then they will get the same record format. If one of them has "color", "part number", and "price", while the other only has two of those, then they will get different record formats.
As noted previously, most DXF objects do not have a line weight associated with them. Color is traditionally used to indicate line weights, but there is no standard of which color corresponds to which line weight. You can choose your own mapping, or communicate with the file originator to determine what the correct line weights should be.
When mapping colors to line weights, you may wish to change the colored lines to black (or white if you are using a black background). Note that most DXF files are created with a black background, and the colors may not show up well on a white background.
In some files you may find that dash lengths are at an inappropriate scale. You can change the dash length scale here. This will not affect line thickness. VectorWorks will convert any dash patterns that are extremely small to solid lines to avoid unacceptable slowdowns during display and printing of the document.
"Points" in a DXF file are sometimes like the locus in VectorWorks, which is meant to be a drawing aid but is not part of the drawing, and sometimes like a symbol that should be printed. You can either choose to import them as loci, or as printable symbols. You may need to edit the size of the symbol, because it is not always exactly specified. If you choose to import them as symbols and as VectorWorks guides, then you can use the Show/Hide guides commands to toggle display of them.
Rays and construction lines (or "xlines") are non-printing DXF objects that are similar to VectorWorks guides. A ray starts at a point and goes off to infinity, while a construction line is anchored at a point and goes off to infinity in both directions. If you choose to import them, they will be converted to lines in the Guides class which have a length limited to the drawing bounds. If this option is unchecked, they will not be imported.