Major projects tend to favour long string/object names that define things like type, location, discipline, stage, etc.  Normally this information would be stored as attributes (metadata) on the object.

The ‘Attribute Manipulator’ (AttMF) allows users to concatenate these attributes into single value.  Concatenating allows complex, project specific, string names to be built up from existing attribute values.  Strings may then be named/renamed via the same AttMF file, rather than being applied via macros/mapping files/etc.

Syntax

To concatenate attributes, each attribute name is enclosed in curly brackets { }

  • {myAttr_1}{myAttr_2}

Delineators can also be used.  Note that they are restricted to valid characters, such as dash and space;

  • {myAttr_1}{mAttr_2}

Free Text can be added, such as ‘mm’ for millimeters;

  • {myAttr_1}{myAttr_2}mm
  • {myAttr_1}FRED{myAttr_2}

And combinations of the above;

  • {myAttr_1}-FRED {myAttr_2}mm

Things to Note

String attributes can only be concatenated with other string attributes.  Likewise vertex and segments.  However, you can still concatenate vertex/segment attributes with string attributes,

  • First copy the vertex/segment attribute to a (temporary) string attribute,
  • Then concatenate the string attributes,
  • Then delete the (temporary) string attribute.

Example

A string has the following attributes;

  • type: W
  • diameter: 90
  • material: uPVC

The attributes are then concatenated using the following syntax in the Default Value field:

  • {type}{diameter}{material}

This will give an attribute value:  W90uPVC

Using a Deliminator between concatenated attribute values

Example: Using a dash between attributes:

  • {type}{diameter}{material}
  • Result:  W-90uPVC

Deliminator also helps with de-concatenating attributes, as the values can contain any number of characters rather than a fixed width.

Using Free Text for Pre/Post-fix values

Example: Adding the diameter units as free text:

  • {type}{diameter}mm
  • Result:  W90mm