Default Values

Default values can be used when defining attributes for BOM classes. This is done through the Advanced 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 an integer type attribute called quantity, it might be given a default value of 1 in the Advanced 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, the following warning is generated:

If you attempt to set a default on an attribute with a multiplicity greater than 1, the following warning is generated: