Shapes

autocad_entity: autocad_shape

Features with autocad_entity set to autocad_shape are point features that identify where to place an AutoCAD shape object. The reader and writer modules process all attributes needed to fully specify the shape object reference. Depending on the output file (.dxf or .dwg), different information will be required to write shape entity. If a template file is specified using the TEMPLATEFILE keyword, then information about shape entity is extracted from the template file, which requires access to the shape file.

When writing to a DXF file, a shape name and a shape file name is all that is required. The presence of a shape file during translation is not required since there is no information lookup.

When writing to a DWG file and a shape name is given, then a lookup is performed to determine the shape index or shape number from the shape file, which is what DWG stores. For the lookup to be successful, the writer needs access to the shape file, and the specified shape name should be in the shape file. Similarly when writing to DWG, a shape number and shape file is all that is required. If there is no shape index or shape number, then the writer has to perform a lookup from the shape name to the shape index, and for this, access to the shape file is required.

When specifying a shape file, either the full path or just the filename can be specified. If only the shape filename is given, the writer will first look for that shape file in the folder specified by SHAPE_DIRECTORY keyword, and if not found then it will look in the folder where the output dataset is being written.

Finally, when writing a shape, if the conditions above with shape names, shape numbers, shape file names, and file type, are met, then an existing shape definition will be used. However, if there is not enough information to find an existing definition (or one cannot be found), then one can be made, using the other shape-related format attributes below. These attributes represent the shape information when reading. When writing, these attributes are only used to make new shape definitions, and are not used when an existing definition is found.

Note:  When an AutoCAD file is output, any shape files that it references must be shipped together with the file.

Attribute Name

Contents

autocad_scale

The scale of the shape object for this point.

Range: 64-bit floating point number.

Default: 1

autocad_shape_index

This identifies the index of the particular shape within the shape file. A single shape file may contain many different shapes.

Range: 64-bit floating point number > 0

Default: No default

autocad_rotation

The rotation of the shape for this entity.

Range: -360.0..360.0

Default: 0

autocad_width_factor

The width factor for the shape.

Range: 64-bit floating point number > 0

Default: 0

autocad_oblique

The oblique angle of the shape, which causes the entity to lean to the right or left of vertical, where positive numbers indicate to the right.

For convenience, the AutoCAD reader and writer will treat the range of values from 275.0..360.0, as an alternative specification of the range from -85.0..0.

Range: -85.0 ..85.0

Default: 0

autocad_big_fontname

The name of the file which contains fonts for large character sets.

Range: char[65]

Default: No default

autocad_shape_name

The name of the shape which is being read or written.

Range: char[33]

Default: No default

autocad_shape_filename

The name of the file in which the shape is defined.

Range: char[65];

Default: No default

autocad_shape_rotation

The rotation of the shape definition relative to the shape file specification.

Range: 64-bit floating point number

Default: 0

autocad_shape_height

The height of the shape as defined in the shape file.

Range: 64-bit floating point number

Default: 0

autocad_shape_width

The width of the shape as defined in the shape file.

Range: 64-bit floating point number

Default: 1

autocad_shape_vertical

Indicates if the shape text, as defined in the shape file, is vertical or horizontal.

Range: yes | no

Default: None