Tags

Elements in a design file may have user-defined attributes attached to them. Such attributes are called tags, and these may be read and written (DGNV8 only) by FME. In addition, to supply a value for a user-defined attribute, tags may also be displayed as text in the original design file.

The Output Tags as Text reader parameter controls whether or not tag data elements will be returned as text elements.

When reading a design file, FME first scans for all the tag data elements and tag set definition elements. Then as it reads each graphical element from the design file, it uses the element association ID to reconnect the data and attribute names with the graphical element. Associated tag data elements with values are then added to the feature returned into FME, while Tag data elements without values are skipped.

The attributes shown in the table below are added to an element for each associated tag.

  • <tag name> is replaced by each TAG NAME that may be associated with the element. For example, if the element is associated with tags called NUMLANES and PAVETYPE, then the feature would have attributes like NUMLANES, NUMLANES.height, PAVETYPE, PAVETYPE.rotation, etc.
  • Most of the tag attributes are same as those of text. For example, igds_tag_names{}.height is the same as igds_text_height and is therefore not explicitly documented. All the other tag attributes are documented as follows:
  • Since tags from multiple tagsets may be attached to a single element, there may be multiple tags with the same name. In this case, the reader will rename the tags to make them unique. The original tag name is stored in the <tag name>.name attribute.

Attribute Name

Required/Optional

Contents

igds_tag_names{}

Required when writing tags through list attributes.

List of tag names attached to an element.

 

Default: No default

<tag name>.tagset_name

Required when writing tags to V8.

The name of the tagset the tag belongs to.

Default: No default

<tag name>.tagtype

Optional when writing tags to V8.

The unique tag ID.

 

Default: 1

Range:

1 = tag of type character string

3 = tag of type integer

4 = tag of type double

 

If tagtype is not provided, it always defaults to character string (that is, type 1).

<tag name>.name

Optional when writing tags to V8.

The name of a tag. Although the tag name is part of the attribute name, the tag may be renamed. This stores the original name from the tagset when reading, and represents the name of the tag that is created when writing.

 

Default: No default

<tag name>.value

 

The value of a tag when reading.

This is the same value stored in the attribute <tag name>, when reading.

When writing, this is used to create the value of a tag when the <tag name> attribute is not present.

 

Default: No default

<tag name>.prompt

Optional when writing tags to V8.

The value of tag prompt as defined in the tagset.

 

Default: No default

<tag name>.color

<tag name>.level

<tag name>.style

<tag name>.weight

 

The value of these tag properties are attributes which are standard for all elements.

More information can be found in IGDS Feature Representation (Format Attributes) under the related attributes: igds_color, igds_level, igds_style, and igds_weight. None of these attributes are used for writing tags to V8.

<tag name>.font

<tag name>.height

<tag name>.width

<tag name>.insertion_x

<tag name>.insertion_y

<tag name>.insertion_z

<tag name>.justification

<tag name>.original_justification

<tag name>.rotation

 

The value of these tag properties are attributes which are common to text elements.

 

More information can be found in IGDS Feature Representation (Format Attributes) under the related attributes: igds_font, igds_text_size, igds_text_width_multiplier, igds_insertion_x, igds_insertion_y, igds_insertion_z, igds_justification, igds_original_justification, igds_rotation.

 

Most of these attributes are used for both reading and writing tags with V8, with the exception of the original justification and the insertion attributes, which are only used when reading.

<tag name>.default_value

Optional when writing tags to V8.

The value of tag default as defined in the tagset.

 

Default: No default

<tag name>.display

Optional when writing tags to V8.

The display value of tag as defined in the tagset.

Note  The writer will always set it to No if tag offsets are not found on the feature.

 

Default: No

Range: Yes/No

<tag name>.x_offset

<tag name>.y_offset

<tag name>.z_offset

Optional when writing tags to V8.

The offset from the associated element to the origin, at the lower left corner of the tag.

If these values are not provided, the writer uses some default values to offset tags from the element.

 

Default: No default

<tag name>.x

<tag name>.y

<tag name>.z

 

The tag origin, which is a convenient access to the lower left position of the tag value, as offset from the element. This is similar to the location point of a text string element.

 

Default: No default

None of these are used for writing tags to DGNV8.

<tag name>.urx

<tag name>.ury

<tag name>.urz

Optional when writing tags to V8.

Tag upper right range of rectangle.

 

Default: No default

<tag name>.llx

<tag name>.lly

<tag name>.llz

Optional when writing tags to V8.

Tag lower left range of rectangle.

 

Default: No default

Note that tag writing is supported by DGNV8 only. To attach tags to an element, set the writer parameter Write Tags to Yes.

There are two ways tagset and tags definitions can be carried over to the V8 writer:

Feature Types

This is the default behavior. The writer looks at the feature types to extract the information of tagsets and tag names. The feature type is assigned as the tagset, whereas the user attributes become its tags.

Note that this approach is introduced to automate the tag writing process and to avoid the amount of work involved using the “list attribute” approach. This approach has the following limitations:

    • The writer can write one tagset per feature only.
    • The writer can define tag names and their corresponding data types only. The tag default, prompt, and display properties cannot be set. The display property is automatically set to No and in order to turn it on, the user needs to set the <tag_name>.display attribute on the feature to Yes.

List Attributes

Another way of writing tags is by providing all tag names as list attributes to igds_tag_names{} on the feature.

The V8 writer looks for the following attributes only when writing tags and uses them to calculate all other values. Therefore, any tag-related attribute provided other than the following will be ignored.

 

igds_tag_names{}

<tag name>.tagset_name

<tag name>.tagtype

<tag name>.prompt

<tag name>.display

<tag name>.default_value

<tag name>.x_offset

<tag name>.y_offset

<tag name>.z_offset

 

In case tag offsets are not provided, then the writer uses some default values for the offsets and turns off the tag’s display property.

For information about working with Lists, see Using Lists to Solve Problems.

Tips for Tag Writing

  • When translating from DGN to DGN, it is advised to ensure that the reader parameter Output Tags as Text is not selected, to avoid getting extra text element on top of the tags being written. Note that this option deselected by default.
  • When translating from DGN to DGN, if the source has tags attached to a cell, then note that setting Expand Named Cells to Yes will attach tags to each cell member. Thus, each cell member will have same tags written in the output file.