Writer Directives

This section describes the directives processed by the AutoCAD DWF writer module. Each of the directives is prefixed by the current <WriterKeyword>_ when they are placed in a mapping file. By default, the <WriterKeyword> for the AutoCAD DWF writer is DWF.

DATASET

Required/Optional: Required

The dataset into which feature data is to be written.

Workbench Parameter: Destination Autodesk AutoCAD DWF File

DWF_VERSION

Required/Optional: Optional

The version of the AutoCAD DWF file to be produced.

The value corresponds with the release number of the AutoCAD DWF file that is produced. This statement specifies the version of AutoCAD file to be output. The statement is of the following form:

<WriterKeyword>_DWF_VERSION <autocad dwf version>

The example statement below instructs the AutoCAD writer to produce a version 4.2 DWF file:

DWF_DWF_VERSION 4.2

Values: 4.2 | 5.5 | 6.0

Default value: 5.5

Workbench Parameter: Version

PASSWORD

Required/Optional: Optional

This statement specifies the password to open the DWF file for reading if it is password protected. The statement is of the following form:

<WriterKeyword>_PASSWORD <autocad dwf password>

The statement below instructs the AutoCAD writer try to open the given dataset with the password “mypass”:

DWF_PASSWORD mypass

Value: <valid password>

Default value: no password

Workbench Parameter: Password

TEMPLATEFILE

Required/Optional: Optional

The name of an existing AutoCAD DWF file that contains the block definitions and linetype definitions to be used when creating the output dataset.

Value: <valid password>

Default value: no password

Workbench Parameter: Template File

TEMPLATEFILE_PASSWORD

Required/Optional: Optional

DWF files support an optional password for additional security. If specified, the given password is provided when the file is opened.

Value: <valid password>

Default value: no password

Workbench Parameter: Template File Password

FORMAT

Required/Optional: Optional

The format of the AutoCAD DWF file to be produced.

Values: COMPRESSED_BINARY | UNCOMPRESSED_BINARY | ASCII

Default value: COMPRESSED_BINARY

Workbench Parameter: Format

X_SIZE

Required/Optional: Optional

Specifies the horizontal width of the output DWF file in pixels.

Values: <valid positive numeric>

Default value: 36000

Workbench Parameter: X Size

Y_SIZE

Required/Optional: Optional

Specifies the vertical height of the output DWF file in pixels.

Values: <valid positive numeric>

Default value: 24000

Workbench Parameter: Y Size

OPTIMIZE_COLOR_MAP

Required/Optional: Optional

This directive, if set, prevents unused colors in the color map from being stored in the DWF file.

Value: YES | NO

Default value: NO

Workbench Parameter: Optimize Colormap

Example:

DWF_OPTIMIZE_COLOR_MAP YES

EXPORT_INVISIBLE_LAYERS

Required/Optional: Optional

This statement exports invisible layers in an AutoCAD file to be output to the DWF file.

Value: YES | NO

Default value: NO

Workbench Parameter: Export Invisible Layers

Example:

DWF_EXPORT_INVISIBLE_LAYERS YES

FORCE_VIEW_TO_EXTENTS

Required/Optional: Optional

This directive, if set, sets the initial viewport of the DWF file to the entire extents instead of the last actively seen viewport.

Value: YES | NO

Default value: NO

Workbench Parameter: Force Initial View to Extents

Example:

DWF_FORCE_VIEW_TO_EXTENTS YES

USE_INKED_AREA

Required/Optional: Optional

This directive, if set, calculates a tight bounding area around the graphic elements of a drawing.

Value: YES | NO

Default value: NO

Workbench Parameter: Use Inked Area

Example:

DWF_USE_INKED_AREA YES

SKIP_LAYER_INFO

Required/Optional: Optional

This directive, if set, prevents additional layer information from being stored in the DWF file.

Value: YES | NO

Default value: NO

Workbench Parameter: Skip Layer Info

Example:

DWF_SKIP_LAYER_INFO YES

SKIP_NAMED_VIEWS

Required/Optional: Optional

This directive, if set, prevents named views from being stored in the DWF file.

Value: YES | NO

Default value: NO

Workbench Parameter: Skip Named Views

Example:

DWF_SKIP_NAMED_VIEWS YES

DEF

Required/Optional: Optional

The AutoCAD DWF writer requires that every feature written to the AutoCAD file be stored within a predefined AutoCAD layer. In AutoCAD, the layers are used to store collections of logically related attributes. Within the FME, the AutoCAD layer and the type of the feature are treated synonymously as there is a one-to-one correspondence between FME feature type and AutoCAD layer.1Layers can also be defined through the use of a TEMPLATEFILE. The order of properties in the layer statement is required as shown, though additional attribute name and type pairs may be in any order. The layer statement is of the following form:

<WriterKeyword>_DEF  <layer name> \
	autocad_color <default color> \
	autocad_linetype <default linetype>\
	[autocad_layer_type frozen] \								  
	[<attribute name> <attribute type>]

where:

  • <layer name> is the name of the layer being defined. This is the name that is used throughout the remainder of the FME mapping files.
  • <default color> is the color number used for all features stored within the layer unless explicitly overridden on the correlation lines below. Valid values are between 1 and 255.
  • <default linetype> is the name of the linetype to use for the layer if no linetype is specified on the correlation line. The linetype specified must either be:
    • defined in the mapping file,
    • copied from a specified template file, or
    • the predefined linetype named CONTINUOUS.
  • <autocad_layer_type> is the type of layer to create. Currently, only the value frozen is supported. If specified, then the created layer is frozen; otherwise, the layer is not frozen.
  • <attribute name> <attribute type> is the definition of an attribute. These are not stored in the output file.

The example below defines a layer called boundary in which entities are drawn using color 13 (unless otherwise specified) and a linetype called dash-dot (unless otherwise specified). The feature also has several attributes specified that will be written to the extended entity data of each feature within the layer.

DWF_DEF boundary \
	autocad_color 13 \
	autocad_linetype dash-dot \
	FEATCODE        char(12)\
	PPID            char(10) \
	DATECHNG        date \
	SURVEYDIST      number(8,2)