Inserts

autocad_entity: autocad_insert

Inserts are point features used in AutoCAD to specify block locations and associated attribution. Inserts are another way in which attribution is stored within an AutoCAD drawing file. The features returned from the AutoCAD reader encapsulate all the information from the AutoCAD insert entity and all attribute entities that are associated with the insert entity.

Insert features can be thought of as block references. They represent the location of an instance of a block definition. When passing features to the AutoCAD writer, those features with the type autocad_insert can be used to match existing block definitions in the TEMPLATE file.

If an attribute passed to the writer is defined by an AutoCAD Attribute Definition in the TEMPLATE file, then the placement of the attribute is taken from the TEMPLATE file unless it is overridden by the attributes shown in the table below.

If the position of the attribute is not specified in a TEMPLATE file and is not specified in the attributes below, then the attributes are placed at the insert location. Apart from the user-defined attributes specified within it, each insert entity also has the following attributes.

Note: Insert Attribute parameters are stored in two locations on the Insert feature:

  • in the respective autocad_<atr_name>_* attributes
  • in the fme_attrib_info list

In a typical conversion, if the feature being written to AutoCAD has both sets of parameters (for example, in a DWG-to-DWG conversion), the fme_attrib_info list takes priority. If you are modifying the attribute contents or parameters as part the conversion, you may wish to remove the fme_attrib_info list before writing.

Note, however, that the autocad_<atr_name>_* attributes take priority if the Writer parameter Attribute Output is set to Inserts.

Attribute Name

Contents

autocad_xscale

The scale factor for the inserted block in the x direction.

Range: 64-bit floating point number

Default: 1

autocad_yscale

The scale factor for the inserted block in the y direction.

Range: 64-bit floating point number

Default: 1

autocad_zscale

The scale factor for the inserted block in the z direction.

Range: 64-bit floating point number

Default: 1

autocad_size_x

The size of the inserted block in ground units in the x direction. This value will be used to set the scale factor of the inserted block, and takes precedence over the value for autocad_xscale.

Range: Any positive real number

Default: No default

autocad_size_y

The size of the inserted block in ground units in the y direction. This value will be used to set the scale factor of the inserted block, and takes precedence over the value for autocad_yscale.

Range: Any positive real number

Default: No default

autocad_size_z

The size of the inserted block in ground units in the z direction. This value will be used to set the scale factor of the inserted block, and takes precedence over the value for autocad_zscale.

Range: Any positive real number

Default: No default

autocad_rotation

The rotation of the inserted block, counterclockwise from horizontal.

Range: -360.0 ..360.0

Default: 0

autocad_number_columns

The column count for the insert.

Range: 0..65536

Default: 1

autocad_number_rows

The row count for the insert.

Range: 0..65536

Default: 1

autocad_column_distance

The column spacing for the insert.

Range: 64-bit floating point number > 0

Default: 0

autocad_row_distance

The row spacing for the insert.

Range: 64-bit floating point number > 0

Default: 0

autocad_block_name

The name of the block insert to be inserted.

Range: char[33]

Default: FMEBLOCK<block_number> where block_number is some unique positive integer > 0.

autocad_block_number

An integer assigned to each block reference (insert) read, which is added to insert point features, and any features that represent entities exploded from a block reference. This attribute is useful in relating block component entities together after exploding blocks.

Range: A unique positive integer > 0

Default: None

autocad_block_insert_x

autocad_block_insert_y

autocad_block_insert_z

The insert point location of the block reference entity.

When reading, these attributes are added to the block reference component entities when the reader parameters Explode Blocks into Entities and Store Insert Location on Components are both enabled.

When writing, these attributes set the insert point of blocks during automatic block creation.

Range: 64-bit floating point number

Default: 0

autocad_attributes_follow

Used during writing to indicate if attributes are also to be stored with the insert entity. This must be specified if feature attributes are to be written as insert attributes to the AutoCAD output file.

This attribute affects both the creation of block attributes when writer parameter Attribute Output is set to Inserts, and the creation of blocks during automatic block creation.

Range: true | false

Default: true

autocad_attribute_display

Indicates if the attribute values are to be visible or invisible. This will not override the visibility flag found in an existing template file attribute definition.

Range: visible | invisible

Default: invisible

autocad_attr_def_tag

(used by the reader only)

Indicates the tag used for “Attribute” definition.

Range: text string

autocad_attr_def_prompt

(used by the reader only)

Specifies the prompt that is displayed when you insert a block containing this attribute definition.

Range: text string

autocad_attr_def_default

(used by the reader only)

Specifies the default attribute value.

Range: text string

fme_attrib_info{N}.field_name

This list attribute hold the name of the Nth attribute.

This attribute should be in the same order and match the attribute definition tag name for the block referenced. Doing otherwise may create unexpected insert attribute data.

Changing this attribute in AutoCAD-to-AutoCAD translations is not recommended.

Range: text string

fme_attrib_info{N}.field_size

This list attribute hold the size of the Nth attribute.

Range integer

Default: 0

fme_attrib_info{N}.field_value

This list attribute holds the value of the Nth attribute.

Range: text string

autocad_<attr_name>_x

autocad_<attr_name>_y

autocad_<attr_name>_z

fme_attrib_info{N}.location_x

fme_attrib_info{N}.location_y

fme_attrib_info{N}.location_z

Used when attributes are associated with the insert elements, enabling the location of the attributes to be specified for display purposes. This specifies the exact location where the attributes are to be placed.

Note that the FME attributes may contain different values than the AutoCAD attributes. This is because the values of the FME attributes will be modified if the justification is not baseline_left in an attempt to be more useful when translating into or out of other formats that support these FME attributes.

Range: Any 64-bit floating point number

Default:

  • x, y, and z value of insert coordinate (for the AutoCAD attributes)
  • 0,0,0 (for the FME attributes)

Reprojectable: Yes

autocad_<attr_name>_
alignment_x
autocad_<attr_name>_
alignment_y

autocad_<attr_name>_
alignment_z

fme_attrib_info{N}.align_x

fme_attrib_info{N}.align_y

Used when attributes are associated with the insert elements, enabling the location of the attributes to be specified for display purposes. This specifies the alignment location where the attributes are to be placed.

Note that the FME attributes may contain different values than the AutoCAD attributes. This is because the values of the FME attributes will be modified if the justification is not baseline_left in an attempt to be more useful when translating into or out of other formats that support these FME attributes.

Range: any 64-bit floating point value

Default:

  • 0,0,0 (for the AutoCAD attributes)
  • Value of fme_attrib_info{N}.location_[x|y|z] (for the FME attributes)

Reprojectable: Yes

autocad_<attr_name>_justification

The justification of the attribute relative to its insertion point (not its alignment point).

Range:

  • autocad_top_left
  • autocad_top_center
  • autocad_top_right
  • autocad_top_middle
  • autocad_top_aligned
  • autocad_top_fit
  • autocad_middle_left
  • autocad_middle_center
  • autocad_middle_right
  • autocad_middle_middle
  • autocad_middle_aligned
  • autocad_middle_fit
  • autocad_bottom_left
  • autocad_bottom_center
  • autocad_bottom_right
  • autocad_bottom_middle
  • autocad_bottom_aligned
  • autocad_bottom_fit
  • autocad_baseline_left
  • autocad_baseline_center
  • autocad_baseline_right
  • autocad_baseline_middle
  • autocad_baseline_aligned
  • autocad_baseline_fit

Default: No default

fme_attrib_info{N}.justification

The justification of the attribute relative to its insertion point (not its alignment point).

Range:

  • top_left
  • top_center
  • top_right
  • top_middle
  • top_aligned
  • top_fit
  • middle_left
  • middle_center
  • middle_right
  • middle_middle
  • middle_aligned
  • middle_fit
  • bottom_left
  • bottom_center
  • bottom_right
  • bottom_middle
  • bottom_aligned
  • bottom_fit
  • baseline_left
  • baseline_center
  • baseline_right
  • baseline_middle
  • baseline_aligned
  • baseline_fit

Default: baseline_left

fme_attrib_info{N}.generation

The generation of the Nth attribute.

Range:

  • normal
  • upside_down
  • backwards
  • upsidedown_backwards

Default: normal

autocad_<attr_name>_style

fme_attrib_info{N}.style

The name of the text style for the attribute. For this attribute to be used by the writer, a template file containing the text style must be specified.

Default: No default

fme_attrib_info{N}.width_
factor

The scaling applied in the x direction, which makes the text wider or narrower. However, this does not affect the weight (boldness) of the text string.

Range: 64-bit floating point number > 0 and <= 10000

Default: 1

autocad_<attr_name>_color

The color number of the attribute. See autocad_color for more information.

Default: The color of the layer on which the insert is placed (not the same as COLOR_BYLAYER).

fme_attrib_info{N}.color.red

fme_attrib_info{N}.color.green

fme_attrib_info{N}.color.blue

These list attributes hold the color of the Nth attribute in RGB values, ranged between 0.0 and 1.0.

Range: real number 0.0-1.0 (inclusive)

Default: No default

fme_attrib_info{N}.color.source

The source of the color. If the attribute’s color does not come from the block or layer, then it is given the value explicit.

Range:

  • use_layer
  • use_block
  • explicit

Default: explicit

autocad_<attr_name>_
rotation

fme_attrib_info{N}.rotation

This specifies the rotation of the attribute, measured in degrees.

Range: Degree of rotation measured counter-clockwise from the horizontal.

Default: 0

Reprojectable: Yes

fme_attrib_info{N}.oblique

This specifies the obliquing angle of the attribute, which causes the text 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_<attr_name>_
height

fme_attrib_info{N}.height

This specifies the height of the attribute in ground units.

Range: Any 64-bit floating point number

Default: 1

Reprojectable: Yes

autocad_<attr_name>_attribute_flag

fme_attrib_info{N}.attribute_flag

A bit-coded value. Values can be combined by using addition. Possible values are:

  • 1 = The attribute is invisible (does not appear).
  • 2 = The attribute contains a constant value.
  • 4 = Verification is required on input of this attribute.
  • 8 = Attribute is preset (no prompt during insertion).

If the fme_attrib_info{N}.attribute_flag attribute is used, the invisibility bit will get overwritten by the fme_attrib_info{N}.isVisible attribute.

If the autocad_<attr_name>_attribute_flag attribute is used, the invisibility bit will get overwritten by autocad_attribute_display if the attributes autocad_visible_attributes{} and autocad_invisible_attributes{} are specified.

Default: 0 if no attribute definitions exist for the attribute (that is, when the Attribute Output parameter is set to Inserts, or autocad_attributes attribute is set to insert_attributes), or value from the attribute definition if attribute definitions are used.

autocad_<attr_name>_layer

fme_attrib_info{N}.layer

The layer on which the attribute definition, corresponding to this attribute, was created.

Default: none

fme_attrib_info{N}.isVisible

These list attributes indicate whether or not the Nth attribute should be displayed.

Range: TRUE | FALSE

Default: FALSE

autocad_visible_attributes{}

The list of attributes that are set to be visible. This is a list attribute. This list will override the visibility flag found in an existing template file attribute definition.

If the string values of attributes in this list have embedded line feed characters, then multi-line attributes will be written.

autocad_invisible_attributes{}

The list of attributes that are set to be invisible. This is a list attribute. This list will override the visibility flag found in an existing template file attribute definition.

If the string values of attributes in this list have embedded line feed characters, then multi-line attributes will be written.

autocad_<attr_name>_x_off
autocad_<attr_name>_y_off

autocad_<attr_name>_z_off

Used when attributes are associated with the insert elements enabling the location of the attributes to be specified for display purposes. This specifies the offset from the location of the insert.

Range: Any 64-bit floating point number

Default: x, y and z value of insert coordinate