Customizing Requirement Codes

Requirement codes are automatically computed from the other attributes of the requirement. You can customize requirement codes in the Code Template tab of the Requirement page of the Model Options dialog box.

In this tab you can:


  • Define a conversion script in the Conversion Script edit box to generate a code value for requirements using macros

  • Select a conversion table from the Conversion table list. This allows you to convert an expression to another, when using the .convert_name or .convert_code macros with any property (not only the name or the code). For more information about macros, see "Using a conversion script" section in the Models chapter of the Core Features Guide. The use of conversion tables is optional. See the "Using a conversion table" section in the Models chapter of the Core Features Guide.

REQ_%-4:Increment% is the default GTL (Generation Template Language) template script. The %increment% variable is a specific variable, which ensures the code uniqueness.

You can customize the default template in order to fit your needs and create user-defined codes for your requirements. To do so, you can use any of the available GTL macros. See "GTL Macros" in the Customizing Generation with GTL chapter of the Customizing and Extending PowerDesigner manual. The code value will be computed using the user-defined template.

You can still modify a requirement code in the requirement property sheet or directly in the document view. In this case, the User-Defined button is pressed automatically to indicate that the modified code no longer satisfy the code template definition. You can always return to the current default code template by re-clicking the User-Defined button.

  1. Select Tools > Model Options to open the Model Options dialog box.
  2. Select Requirement beneath the Naming Convention node in the Category tree view.
  3. Specify a script in the Conversion Script edit box.

  4. [Optional] Select a conversion table.
  5. Click Ok to close the dialog box.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com