Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
42
Добавлен:
16.04.2013
Размер:
3.34 Mб
Скачать

&KDSWHU 0DQDJLQJ 2EMHFWV

$WWDFKLQJ D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW XVLQJ WKH FRQWH[WXDO PHQX RI WKH 3RZHU'HVLJQHU REMHFW V\PERO

From the contextual menu of the PowerDesigner object symbol, you can directly choose a file from a standard Open dialog box to create an external file object.

ϖ7R DWWDFK D ILOH REMHFW WR D 3RZHU'HVLJQHU REMHFW XVLQJ WKH FRQWH[WXDO PHQX RI WKH 3RZHU'HVLJQHU REMHFW V\PERO

1 Right-click a PowerDesigner object to open its contextual menu. 2 Select FileAdd Files to open a standard Open dialog box.

3Select a file and click Open.

The file object symbol automatically appears in the diagram linked with an extended dependency to the PowerDesigner object symbol.

0RGLI\LQJ WKH ILOH REMHFW GLVSOD\ SUHIHUHQFHV

You can modify the following display preference for a file object using the

ToolsDisplay Preferences command:

3UHIHUHQFH 'HVFULSWLRQ

Show location

Displays the location of the file object

 

 

6DYLQJ D ILOH REMHFW

You cannot save an embedded file object individually. When you save the model you also save all the embedded file objects it contains.

For more information on saving models, see section Saving a model in chapter Managing Models.

General Features Guide

 

:RUNLQJ ZLWK H[WHQGHG PRGHO GHILQLWLRQV

:RUNLQJ ZLWK H[WHQGHG PRGHO GHILQLWLRQV

Extended model definitions provide means for customizing PowerDesigner parameters and generation. You use extended model definitions to:

Extend the PowerDesigner metamodel and develop the definition of modeling objects using H[WHQGHG DWWULEXWHV

Further define OOM objects by creating predefined VWHUHRW\SHV

Further define extended dependencies between PowerDesigner objects by creating predefined VWHUHRW\SHV

Complement the generation WDUJHWV and FRPPDQGV of an object model

*HQHUDWH for an extended model definition

What is an extended model definition?

How to use extended model definitions?

For more information on extended model definitions, see chapter Extended Model Definitions Reference Guide in the $GYDQFHG 8VHU GRFXPHQWDWLRQ.

An extended model definition is a set of extended attributes, stereotypes, and generation parameters organized into categories corresponding to objects of a given type of model. It allows to extend the definition of model objects and the default model object generation.

You can create generic and specific extended model definitions.

A JHQHULF extended model definition is a library of extended attributes, stereotypes, and generation parameters. This file is stored in a central area and can be referenced by models to guarantee data consistency and save time to the user

A VSHFLILF extended model definition is embedded into a model and develops object definitions and generation parameters in this particular model

&UHDWLQJ DQ H[WHQGHG PRGHO GHILQLWLRQ

When you create a new extended model definition you can choose to:

Create a generic extended model definition file to reuse between models

Create a specific extended model definition for the needs of a given model

The creation procedure differs according to the type of extended model definition you want to create.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

&UHDWLQJ D JHQHULF H[WHQGHG PRGHO GHILQLWLRQ

You can create generic extended model definitions files to prepare libraries of extended attributes and stereotypes to share between models of the same type.

ϖ7R FUHDWH D JHQHULF H[WHQGHG PRGHO GHILQLWLRQ

1 Open a model.

2 Select ToolsResourcesExtended Model DefinitionsModel type. The List of Extended Model Definitions appears.

3 Click the New tool to display the New Extended Model Definition window.

4Type a name for the new extended model definition in the Name box.

5<optional> Select a model template from the Copy From box. The dropdown listbox is empty if you create the first extended model definition.

6Click OK.

A standard Save As dialog box appears.

7Type a name and select a directory for the new extended model definition.

8Click Save.

General Features Guide

 

:RUNLQJ ZLWK H[WHQGHG PRGHO GHILQLWLRQV

The Extended Model Definition Properties dialog box appears. The General page displays all objects of the extended model definition together with an editor of extended model definitions on the right side of the tree view.

9Define extended attributes and stereotypes for the different categories of objects.

For more information on how to define extended attributes and

stereotypes, see chapter Extended Model Definitions Reference Guide in the $GYDQFHG 8VHU GRFXPHQWDWLRQ.

10 Click OK.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

The List of Extended Model Definitions displays the new extended model definition, whose name is followed by a star symol to designate the state of an extended model definition to be saved. The first time you save your extended model definition, the symbol is no longer displayed.

11Click Close.

A confirmation box prompts you to save the changes made to the extended model definition, click Yes. The extended model definition is saved in a file with the .XEM extension.

,PSRUWLQJ DQ H[WHQGHG PRGHO GHILQLWLRQ ILOH

If you want to integrate a generic extended model definition into a model, you can import an extended model definition file.

For more information on importing extended model definitions, see section Selecting extended model definitions.

&UHDWLQJ D VSHFLILF H[WHQGHG PRGHO GHILQLWLRQ IRU D PRGHO

You can create an extended model definition for a specific model, in this case, it has the same type as the current model.

ϖ7R FUHDWH D VSHFLILF H[WHQGHG PRGHO GHILQLWLRQ IRU D PRGHO

1 Open a model.

2 Select ModelExtended Model Definitions to display the List of Extended Model Definitions.

3 Click the Add a Row tool to create a new extended model definition.

General Features Guide

 

:RUNLQJ ZLWK H[WHQGHG PRGHO GHILQLWLRQV

4Type a name for the extended model definition.

5Click the Properties tool to display the property sheet of the extended model definition.

You are asked to commit the creation of the extended model definition.

6Click Yes.

The Extended Model Definition Properties dialog box appears.

7Define extended attributes and stereotypes for the different categories of objects.

For more information on how to define extended attributes and

stereotypes, see chapter Extended Model Definitions Reference Guide in the $GYDQFHG 8VHU GRFXPHQWDWLRQ.

8Click OK.

You return to the List of Extended Model Definitions.

9Click OK.

([SRUWLQJ DQ H[WHQGHG PRGHO GHILQLWLRQ

If you want to share an extended model definition created for a model with other models, you can export this extended model definition in order to reuse it with other models.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

For more information on exporting extended model definitions, see section Exporting an extended model definition.

0LVVLQJ H[WHQGHG PRGHO GHILQLWLRQ

When you import a shared extended model definition in a model, you create a link between the model and the extended model definition file. If you rename, move or delete the extended model definition file associated with the model, you break this link.

The following dialog box appears when you open a model linked to a shared extended model definition file that is missing from the directory where it was created:

The Missing Extended Model Definitions dialog box displays the name and path of the missing(s) extended model definition(s).

You can use the following tools:

7RRO 'HVFULSWLRQ

Opens a standard Open dialog box in which you can browse and select the missing extended model definition. When you select the correct path and file, the extended model definition disappears from the list

Deletes the link between the model and the shared extended model definition. The missing extended model definition disappears from the list

General Features Guide

 

:RUNLQJ ZLWK H[WHQGHG PRGHO GHILQLWLRQV

6HOHFWLQJ H[WHQGHG PRGHO GHILQLWLRQV

Extended model definitions (.XEM files) provide means for customizing and extending PowerDesigner metaclasses, parameters and generation. Extended model definitions are typed like models in PowerDesigner. You create an extended model definition for a specific type of model and you cannot share these files between heterogeneous models.

When you create a new model, or when you reverse engineer into a new

model, you can select one or several extended model definitions and attach them to the model from the New 0RGHO dialog box.

You can also import a generic extended model definition file into your current model. When you import an existing extended model definition, you reuse the extended attributes and stereotypes defined in a library available on your machine.

1DPLQJ FRQYHQWLRQV

When you import an extended model definition and copy it into a model, the name and code of the extended model definition may be modified in order to respect the naming conventions of the Other Objects category in the Model Options dialog box.

You can choose one of the following options:

2SWLRQ

'HILQLWLRQ

Share

Current extended model definition constantly refers to the extended

 

model definition stored in the Resource Files\Extended Model

 

Definitions directory. Any changes made to the extended model

 

definition are shared by all linked XEM

Copy

Current extended model definition is a unique copy of the extended

 

model definition stored in the Resource Files\Extended Model

 

Definitions directory. The current extended model definition is

 

independent of the original one, so modifications made to the

 

extended model definition in the Resource Files\Extended Model

 

Definitions directory are not available to the copied XEM. This one is

 

saved with the model and cannot be used without it

 

 

For more information on extended model definitions, see chapter Extended Model Definitions Reference Guide, in the $GYDQFHG 8VHU 'RFXPHQWDWLRQ

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

([SRUWLQJ DQ H[WHQGHG PRGHO GHILQLWLRQ

You can export an extended model definition created in a model if you wish to share this definition with other models. Export allows you to create a XEM file that will be stored into your extended model definition library directory. When you export an extended model definition, the specific extended model definition remains embedded in the model.

An extended model definition created in a model does not appear in the List of Extended Model Definitions. Whereas an exported extended model definition appears in the List of Extended Model Definitions.

ϖ7R H[SRUW DQ H[WHQGHG PRGHO GHILQLWLRQ LQWR D PRGHO

1Select ModelExtended model definitions to display the List of Extended Model Definitions.

2Select an extended model definition in the list.

3Click the Export an Extended Model Definition tool. A standard Save As dialog box appears.

4Type a name and select a directory for the extended model definition.

5Click Save.

The extended model definition is saved in a library directory where it can be shared with other models.

General Features Guide

 

$FFHVVLQJ REMHFWV XVLQJ 9%6FULSW

$FFHVVLQJ REMHFWV XVLQJ 9%6FULSW

In critical size models or when dealing with several models at the same time, it can be sometimes very tedious to perform repetitive tasks on a series of objects or models, for example modifying objects using global rules, importing or generating new formats or even checking models.

VBScript is a scripting language powered by Microsoft that you can use to write scripts for automating those operations. PowerDesigner provides an integrated support for Microsoft VBScript so that you can write and run

scripts to act over PowerDesigner metamodel objects in a development environment using SURSHUWLHV and PHWKRGV. Every PowerDesigner objects

can be read and modified (creation, update or deletion).

For more information on Microsoft VBScript, see the following Web address KWWS PVGQ PLFURVRIW FRP VFULSWLQJ GHIDXOW KWP" VFULSWLQJ YEVFULSW .

PowerDesigner ships with a metamodel published in an Object Oriented Model (metamodel.oom) that illustrates how metadata interact in the

software. All objects in the PowerDesigner metamodel have a name and a code. They correspond to the SXEOLF QDPH of the metadata. An HTML help

file (pdvbs9.chm) is also provided to allows you to find out which properties and methods can be used to drill down to a PowerDesigner object.

For more information on metadata, see chapter PowerDesigner Public Metamodel in the $GYDQFHG 8VHU 'RFXPHQWDWLRQ.

PowerDesigner also provides a set of script samples that you can use as a basis to create your own scripts.

VBScript allows you to perform any kind of data manipulation but you can also insert and customize commands in the Tools menu that will allow you to automatically launch your own scripts.

/LPLWDWLRQV

You cannot access the following PowerDesigner features using VBScript: reverse engineering and all types of generations or algorithms such as rebuild index or rebuild data type links for example.

 

PowerDesigner

Соседние файлы в папке PowerDesigner 9