Autodesk AutoCAD DWF Reader/Writer

The AutoCAD® DWF Reader/Writer enables FME to read and write files used by Autodesk® AutoCAD and compatible systems. AutoCAD drawing files consist of drawing settings and configuration, as well as a series of entities, or graphic elements, organized into layers.

FME provides broad support for many AutoCAD entity types and options and for reading and writing AutoCAD DWG and DXF files with versions up to and including 2010. FME also provides support for reading and writing AutoCAD DWF files up to and including version 6.0. When AutoCAD data is output, header information may be copied from a supplied template, or prototype, file.

This chapter assumes familiarity with AutoCAD-compatible systems and the entities (features) that are manipulated within these systems.

Note: Throughout this chapter, the AutoCAD file is referred to as a drawing file rather than a DWF file.

Overview

There are three supported formats used by AutoCAD:

  • DXF (drawing exchange format) files, which are large ASCII files,
  • DWG (drawing) files, which are binary and support the most entity types, and
  • DWF (drawing web format) files, which are binary files of reduced size and functionality intended for display on limited-bandwidth mediums such as the Internet.

Logically, both DWG and DXF files are identical and, therefore, FME treats both file types in the same manner. DWG/DXF files are read by the AutoCAD DWG/DXF Reader/Writer.

DWF files are handled seamlessly but internally they undergo a different series of translation processes. These are read separately by the AutoCAD DWF reader and writer. Currently the DWF reader and writer can read and write sheets and models from two-dimensional (2D) DWF files.

This chapter contains information related to the AutoCAD DWF reader/writer. For general AutoCAD DWG/DXF information and AutoCAD feature types supported by FME, please refer to the Autodesk AutoCAD DWG/DXF Reader/Writer.

Reader Overview

The AutoCAD DWF reader extracts entities, one at a time, from the entity section of the drawing file and passes them on to the rest of the FME for processing. Complex entities such as polylines and inserts are exploded and broken into several individual FME features. If the entity has attribution stored as extended entity data, then these attributes are ignored.

When the AutoCAD reader encounters an entity type it does not know how to process, it simply sets the entity type of the feature and returns it. This feature is then logged by the FME correlation subsystem and the reader moves on to the next entity.

Writer Overview

The AutoCAD writer provides the following capabilities when writing AutoCAD files.

  • Password security: Passwords can be created for DWF files written by FME.
  • Multiple file formats: DWF files can be written as either compressed or uncompressed binary files, or as ASCII files.
  • Resolution: DWF file resolution can be determined at translation time in the form of the X Size and Y Size writer keywords. These are specified in pixels.
  • Color Map Optimization: Colors in the color map that are unused can be eliminated from the output file to reduce space.
  • Export Invisible Layers: Invisible Layers can be optionally exported if desired. (Not supported for Write 3D)
  • Force View Extents: The initial viewport of the output file can be overwritten to include the entire extents of the drawing instead of the default active viewport.
  • Use Inked Area: The inked area of the DWF file can be calculated from the entities in the file to produce a tight bounding rectangle around drawable graphic entities.
  • Skip Layer Info: Additional layer information can be omitted from the output DWF file to reduce space.
  • Skip Named Views: Named viewports can be omitted from the output DWF file in order to save space.
  • Multi-version Support: The AutoCAD DWF writer supports files that are compatible with any current AutoCAD release.

When creating AutoCAD DWF files, the AutoCAD writer first defines the linetypes and layers defined within the FME mapping file. The writer then reads in a template file, if specified, and copies the linetypes, layer definitions, shape file header information, and block information from the template file to the output dataset.

The AutoCAD DWF writer then outputs each feature it is given to the output file in the appropriate entity type. The AutoCAD DWF writer creates a geometric representation of FME features, but does not create attribute information in the output file.

When writing an AutoCAD DWF file, the format of file output is determined as follows:

  • If the file name contains .dwf or .DWF, then the output dataset is written in DWF format.
  • Otherwise, if an error exists in the mapping file, the translation is halted.