You are here: Popular Formats > Autodesk AutoCAD DWG/DXF Reader/Writer > Feature Representation

Feature Representation

Special FME feature attributes are used to hold AutoCAD entity attributes. The AutoCAD writer uses these attribute values as it fills in an entity structure during output. The AutoCAD reader sets these attributes in the FME feature it creates for each entity it reads.

FME considers the AutoCAD layer1The feature layer name corresponds to be the feature type and autocad_layer when reading. This enables the layer name to be extracted without requiring the FeatureTypeExtractor transformer. to be the FME feature type of an AutoCAD feature. Each AutoCAD entity, regardless of its entity type, shares a number of other attributes, as described in the following table.

Attribute Name

Used by Reader or Writer

Content

autocad_layer

Both

The name of the feature’s layer. This is the same value as the feature’s type and is stored when reading for reasons of convenience. This value is ignored when entities are being written to a drawing file.

Note: This attribute is used for the separate AutoCAD Map 3D Object Data Writer.

Range: char[50]

Default: No default

autocad_original_layer Reader-only

The name of the layer of the entity in the source dataset that was read to produce the feature. This is set when the original entity is not the entity that is represented by the feature.

For example, if the reader parameter Explode Block Entities is selected, the original entity read is the block and the entity represented by the feature is a block part. In that case, the autocad_layer attribute stores the block part layer, and the autocad_original_layer attribute stores the block layer.

Range: char[50]

Default: No default

autocad_layer_color

Both

This is the color value for the layer of the entity.

This is only set when the Store Layer Properties on Featuresreader parameter is selected.

See autocad_color for more information.

Range: 0...256

Default: 256

autocad_layer_linetype

Both

This is the linetype value for the layer of the entity. See autocad_linetype for more information.

This is only set when the Store Layer Properties on Featuresreader parameter is selected.

Range: char[33]

Default: BYLAYER

autocad_layer_lineweight

Both

This is the lineweight value for the layer of the entity.

This is only set when the Store Layer Properties on Featuresreader parameter is selected.

See autocad_lineweight for more information.

Range: 0, 5, 9, 13, 15, 18, 20, 25, 30, 35, 40, 50, 53, 60, 70, 80, 90, 100, 106, 120, 140, 158, 200, 211, -1 (by layer), -2 (by block), -3 (default)

Default: -3 (Default)

autocad_layer_type

(not used in RealDWG)

Reader-only

Indicates whether or not the feature comes from a frozen layer.

Range: frozen | not_frozen

autocad_layer_frozen Reader-only

Indicates whether or not the feature comes from a frozen layer. This provides equivalent information to autocad_layer_type.

Range: yes | no

Default: no

autocad_layer_locked Reader-only

Indicates whether or not the feature comes from a locked layer.

Range: yes | no

Default: no

autocad_layer_hidden Reader-only

Indicates whether or not the feature comes from a hidden layer.

Range: yes | no

Default: no

autocad_layer_on Reader-only

Indicates whether or not the feature comes from a layer that is "on" in drawing file terms.

Range: yes | no

Default: yes

autocad_layer_plottable Reader-only

Indicates whether or not the feature comes from a layer that is plottable in drawing file terms.

Range: yes | no

Default: yes

autocad_layer_desc Reader-only

Represents the description field of a layer.

Range: char[254]

Default: No default

autocad_color Reader and Writer

The color number of the entity.

If the value is 0, then the color of the entity is COLOR_BYBLOCK, which means that of the enclosing block; if the value is 256, then the color of the entity is COLOR_BYLAYER which means the color specified by the entity’s layer; otherwise, the number specified determines the color of the entity.

If the reader parameter Resolve Entity Color is set, then this will be a valid AutoCAD index color between 1 and 255.

If autocad_color is not specified during writing, then the value will be set from fme_color. If fme_color is also not specified, then it will be set to COLOR_BYLAYER.

Note that there no way to write features as entity components of a block, so a value of 0 on write is not the most useful.

Range: 0...256

Default: 256

autocad_original_color Reader-only

The color of the entity before it may be resolved to a specific color index, using the reader parameter Resolve Entity Color.

If the value is COLOR_BYBLOCK (index 0) or COLOR_BYLAYER (index 256), then the value of this attribute is ByBlock or ByLayer, respectively. Otherwise, the number specified determines the color of the entity, like the value of autocad_color.

See autocad_color for more information.

Range: 0...256

Default: 256

autocad_true_color Reader and Writer

The true color Red Green Blue (RGB) values of the entity.

This attribute is conditionally set on read in addition to the autocad_color attribute. This attribute is used in preference to the autocad_color attribute on write to set the color of an entity.

If not present, see the autocad_color attribute.

Range: 0...255,0...255,0...255

Default: No default

autocad_entity_
handle

Reader and Writer

The hexadecimal unique identifier for the entity. This value is unique within each AutoCAD file.

Range: Hexadecimal identifier.

Default: No default

autocad_entity_visibility

Reader-only

Indicates the entity's visibility property setting. This is different than hidden layers, although either may cause an entity to not appear.

Range: visible | invisible.

autocad_linetype

Reader and Writer

The name of the feature’s linetype. This can be a specific linetype value or it may be set to BYLAYER, indicating that the linetype will be set to the linetype value of the layer.

When writing, this name must match a line style definition in the template file used.

See autocad_resolved_linetype for more information.

Range: char[33]

Default: BYLAYER

autocad_linetype_scale Reader and Writer

The amount to scale the feature’s linetype by for viewing in AutoCAD.

Failure to set appropriate values for linetype may result in viewing errors such as dashed lines appearing solid.

Range: 64-bit floating-point number

Default: 1.0

autocad_lineweight Reader and Writer

The lineweight of the AutoCAD entity in hundredths of a millimeter.

To set a lineweight of 0.05 mm in AutoCAD, set the attribute value to 5 (you can think of this as the size of the pen used to draw lines).

Range: 0, 5, 9, 13, 15, 18, 20, 25, 30, 35, 40, 50, 53, 60, 70, 80, 90, 100, 106, 120, 140, 158, 200, 211, -1 (by layer), -2 (by block), -3 (default)

Default: -3 (Default)

autocad_resolved_
linetype
Reader and Writer

This is used to store actual linetype value used for a feature. It will be the specific linetype value of the feature, or if the autocad_linetype has the value of BYLAYER or BYBLOCK, then this value will be the linetype of the layer.

Range: char[33]

autocad_thickness

Reader and Writer

The thickness value represents the extrusion or extension of a 2D entity along the normal to the plane of the entity.

Range: 64-bit floating-point number

Default: 0

autocad_entity

Reader and Writer

The FME name for the type of entity this feature represents.

Range: See AutoCAD Entity Types and Descriptions

Default: No default

autocad_original_entity

Reader and Writer

This attribute indicates that the entity is part of a block reference entity that has been resolved into its components. In general, if this attribute exists, its value will be insert.

Range: See AutoCAD Entity Types and Descriptions

Default: insert

autocad_original_entity_type

Reader and Writer

The FME name for the original type of entity this feature represents. For example, if the autocad_entity attribute is autocad_line, this attribute will indicate what type of line (that is, line, 2dpolyline, lwpolyline or 3dpolyline).

Range: See AutoCAD Entity Types and Descriptions

Default: The value of the autocad_entity attribute

autocad_space

Reader and Writer

This attribute indicates if the entity being read came from a paper space or the model space.

When the Read Paper Space reader parameter is set to Yes and a paper space name is included in the Read Selected Paper Spaces reader parameter, this will contain the name of the layout associated with the paper space that held the feature. When a template file is specified, the writer will use this attribute to write the feature to the correct paper space.

Range: model_space | paper_space | Layout Name String

Default: No default

autocad_attributes

Writer- only

Directs the writer on how the attributes for the feature are to be stored.

If this attribute is specified as extended_ entity_data then the attribution associated with the feature is written to the extended entity portion of an entity written. If the value is insert_attributes, insert entities are created for the attributes. If this attribute is not specified or if the value is external_attributes, then limited attribution is written to extended entity data.

See the Attribute Output writer parameter.

Range: extended_entity_data | insert_attributes | external_attributes
Default: external_attributes

These topics describe attributes specific to each of the supported entity types:

Extended Entity Data

List Format

Structure Format (deprecated)

Interpreted Format

XRecord Data

Proxy Data

Lines

XLines

Points

Ellipses

Polygons

Splines

Shapes

Leaders

Faces

Arcs

Traces

Solids

Rays

Text Entities

Multi-Leader Entities

Multi-Text Entities

Multi-Line

Inserts

Dimensions

Group

Hatches

MPolygons

Surfaces

3D Solids

Rasters

External References

Viewports

XRecord

Drawing System Variables