About Attributes

An attribute is any characteristic that can be assigned to an object or relationship. Objects can have attributes such as size, shape, weight, color, materials, age, texture, and so on. Relationships can have attributes such as quantity, usage, and so on.

You must be a Business Administrator to add or modify attributes. To create an attribute, see Syntax for the Add Attribute Command.

This page discusses:

Attributes for Objects

In the 3DEXPERIENCE platform, objects are referred to by type, name, and revision. Object types are defined by the attributes they contain. When an object is created, you specify the object type and any attribute values for that object instance.

For example, assume the object is clothing. It might have attributes such as article type (for example, pants, coat, dress, shirt, and so on), size, cost, color, fabric type, and washing instructions. Now assume you are creating a new article of clothing. When you create this object, the app prompts you (displays a create form) to provide values for each of the assigned attributes. You might assign values such as jacket, size 10, $50, blue, wool, and dry clean.

The specific value for each attribute can be different for each object instance. However, all objects of the same type have the same attributes. Some attributes might be required and others might be optional.

Attributes for Relationships

Like business objects, a relationship might or might not have attributes. Since a relationship defines a connection between two objects, it has attributes for characteristics that describe that connection.

For example, an assembly could be connected to its components with a relationship called, "component," which could have an attribute called "quantity." When the component and the assembly are connected, the user would be prompted for the quantity or number of times the component is used in the assembly.

The same attributes could apply to either the objects or the relationship. When an object requires additional values for the same attribute in different circumstances, it is easier to assign the attributes to the relationship. Also, determine whether the information has more meaning to users when it is associated with the objects or the relationship.

Attribute Types

When creating an attribute, you must include the Type clause to identify the type of values the attribute will have. An attribute can be one of these types of values:

  • date
  • integer
  • string
  • real
  • Boolean
  • binary
  • enum
  • shortbinary
Shortbinary attributes contain internal IDs and enum attributes contain range values. When determining the attribute type, you can narrow the choices by deciding if the value is a number or a character string. Once a type is assigned to an attribute, it cannot be changed. The user can associate only values of that type with the attribute.

Attributes Ranges

You can define a range of values that can be selected for the attribute. This range provides a level of error detection and gives the user a way of searching a list of attribute values. If you define an attribute as having a specific range, any value the user tries to assign to that attribute is checked to determine if it is within that range. Only values within all defined ranges are allowed. There are several ways to define a range:

  • Using a relational operator, such as is less than (<) or is equal to (=)
  • Using a range with a pattern, or special character string, such as starts with A (A*)
  • Using multiple ranges to provide a list of allowed values
  • Using a program to define a range depending on conditions
  • Using a specific list of acceptable values (such as Small, Medium, and Large)

For more information, see Multi-Value and Range-Value Attributes.

Default Values

When a business object is created and the user does not fill in the attribute field, the default value is assigned. When assigning a default value, the value you give must agree with the attribute type. If the attribute should contain an integer value, you should not assign a string value as the default.

For example, assume you want to define an attribute called PAPER_LENGTH. Since this attribute will specify the size of a sheet of paper, you defined the type as an integer. For the default value, you might specify 11 inches or 14 inches, depending on whether standard or legal size paper is more commonly used.