Applying a Dimension to an Existing Attribute

You can add a dimension to attributes of type integer or real, whether or not the attributes already belong to instantiated business objects. The existing value stored for that attribute will be treated as the normalized value.

However, if the existing value is a unit other than what the dimension uses as its default, you need to convert those values. For example, an existing attribute Length has stored values where the business process required the length in inches. You want to add a Length dimension to the Length attribute, and that dimension uses centimeters as the default. If you just add the dimension to the attribute, the existing values will be considered as centimeters without any conversions.

As another example, the Length attribute can be used with multiple types. Some types may use the attribute to store lengths in millimeters, while others store lengths in meters. Because there is only one attribute Length that represents two kinds of data, the dimension cannot be applied without normalizing the business types on the same unit.

  1. Use the convert attribute command to convert the attribute to a single unit of measure:

    convert attribute ATTRIBUTE_NAME to unit UNIT_NAME on temp query bus "TYPE" * *;

    This command applies the unit UNIT_NAME to the attribute, which causes the conversion from the existing value with the applied units to normalized values. The system displays this message:
    Convert commands will perform mass edits of attribute values.
    You should consult with support Dassault Systèmes
    to ensure you follow appropriate procedures for using this command.
    Proceed with convert (Y/N)?
    If the system message includes the following warning, the data for this attribute has already been converted and you should not continue (type N).
    WARNING: The search criteria given in the convert command
    includes objects that currently have unit data. This convert command
    will overwrite that data.
  2. To add the dimension to the attribute:

    mod attribute ATTRIBUTE_NAME dimension DIMENSION_NAME;

    For more information, see MQL Command Reference: Modify Attribute.