Chapter 5 Managing Models


Defining name/code conversion

You can set conversion scripts in order to generate the name of an object from its code or the code of an object from its name using specific macros and conversion tables. You must select the Enable name/code conversions check box in the upper part of the Naming Convention page of the Model Options dialog box for this feature to be available. Name/code conversions can be applied to all named objects in a model or for each type of object individually.

The category Other Objects in the tree view lets you define name and code conversions for models and all objects that are not visible in the tree view.

Enable name/code conversion option
Name/code behavior
Selected Use of conversion scripts and conversion tables to generate a code from a name or a name from a code together with the application of naming conventions
Unselected Names are copied from codes or codes are copied from names together with the application of naming conventions

Name to Code mirroring mode

When you create an object in PowerDesigner, you may have to type a name and click the Equal button after the Code box to set the code equal to the name because the Name to Code mirroring mode may not be selected in the General Options dialog box.

You can select this operating mode to automatically set the code equal to the name and thereby apply the conversion scripts you defined to both names and codes.

For more information on the Name to Code mirroring option, see section Defining dialog box operating mode in chapter using the PowerDesigner interface

Conversion scripts allow you to alternatively generate a code from a name and a name from a code. You define conversion scripts from the corresponding tabs in the Naming Convention page of the Model Options dialog box. Usually name into code conversion is the most commonly used:

Tab Description
Name To Code You use it when you want to generate a code from a name
Code To Name You use it when you want to generate a name from a code

Each tab allows you to:

 


Copyright (C) 2005. Sybase Inc. All rights reserved.