A constant is an Attribute that is set up as read-only. You can create local constants for a Class, Data Type, Interface or Signal, or global constants for a Package.
To create a global constant:
1. Locate the Package for which you want to create a global constant.
2. Right-click the Package, point to New, point to UML, point to Structure, and then click Attribute
3. Type a name for the constant, and then press the Enter key.
4. Open the Property Pages for the Attribute you created, and then click the Options tab.
5. Select the Read Only check box.
6. Click the Data Type tab.
7. In the Default box, type the value of the constant.
To create a local constant:
1. Locate the Class, Data Type, Interface or Signal for which you want to create a local constant.
2. Right-click the item, point to New , and then click Attribute
3. Type a name for the constant, and then press the Enter key.
4. Open the Property Pages for the Attribute you created, and then click the Options tab.
5. Select the Read Only check box.
6. Click the Data Type tab.
7. In the Default box, type the value of the constant.