Default Values

Default values can be used when defining attributes for BOM classes. This is done through the Resource tab in the Properties.

If an attribute has a default value, then as soon as an instance of the class that it is an attribute of is created, the attribute has that value. For example, if a class has a Number type attribute called quantity, it might be given a default value of 1 in the Resource Property tab as shown below:

When an instance of this class is created, the quantity attribute will be 1.

If you attempt to set a default on an optional attribute, for example, one with a potential multiplicity of zero, a
Default value for an optional attribute will always apply
warning is generated.
If you attempt to set a default on an attribute with a multiplicity greater than 1, a
Default values are ignored for attributes with a multiplicity greater than one
warning is generated.