Chapter 6 Managing Models


Opening, saving, closing, and deleting models

You open, save, close, and delete models using the File menu or directly in the Model Explorer.

Opening a model

Steps To open a model not in the present project:

  1. Select File→Open from the PowerDesigner menu bar to open a file selection dialog.
  2. Browse to and select a model, and then click OK.

    The model is added to the project and opened in the Model Explorer.

By default, when you open a project, the models linked to project are closed, in order to save working memory.

Steps To open a model which is closed in the project:

  1. Right-click the model node and select Open from the model contextual menu.

You can open a model as read-only when you do not need to modify its content.

Steps To open a model as read-only:

  1. Select File→Open and select the Open as read-only check box in the Open dialog box.

    or

    Right-click a model closed in the project and select Open As Read-only in the contextual menu.

    The model opens with (Read-only) specified in the title bar.

Saving a model

When a model contains unsaved changes, an asterisk is appended to its name in the Model Explorer.

When you save a model or a multi-model report, PowerDesigner automatically assigns to the file a unique identifying number called GUID (Global Unique ID), and creates a backup copy of your file with the same identifying number. The GUID is used:

The following formats are available when you save a model:

Format Description
XML [default] The saving and loading time is longer (1.5x) than binary, and the file size is bigger (2.5x) than binary.

You can open and modify the contents of an XML model file.

XML is recommended for small models.
Binary Saving and loading time is shorter than XML, and the file size is smaller than XML

Recommended for big models.

Steps To save a model:

  1. Select File→Save.

    or

    Click the Save tool in the PowerDesigner toolbar.

    or

    Right-click the model entry in the Model Explorer and select Save from the contextual menu.

    If you did not define a file name when you created the new model, the Save As dialog box asks you to indicate a name and a path for the file of the new model.

You can create a backup version of a model with the same GUID as the original.

Steps To save a model as a new file with the same GUID:

  1. Select File→Save As.

    or

    Right-click the model node in the Model Explorer and select Save As from the contextual menu.

You can save the model as a new model with a new GUID. This allows you to develop two separate models in parallel, starting from the same set of model objects.

Note that when you consolidate the new model in the Repository, the Update mode will not be available. External shortcuts located in the new model may also not work properly since the identity of the model has changed.

Steps To save a model as a new file with a new GUID:

  1. Select File→Save As New Model.

    or

    Right-click the model node in the Model Explorer and select Save As New Model from the contextual menu.

You can save the project and all the models it contains with a single click.

Steps To save all models:

  1. Select File→Save All.

    or

    Click the Save All tool in the PowerDesigner toolbar.

Renaming a model

You can rename a model in the Model Explorer.

Steps To rename a model in the Model Explorer:

  1. Select the model node in the Model Explorer.
  2. Click in the selection to make the name editable.

    or

    Press f2.

    or

    Right-click the node and select Rename from the contextual menu.
  3. Type a new name for the model and press enter.

Closing a model

When you close a model you free up working memory, but the model remains available in the project to be re-opened:

Steps To close a model:

  1. Right-click the model.
  2. Select Close in the contextual menu.

    If the model needs to be saved, a Save dialog box is displayed.

    The node in the Model Explorer is tagged with a red dot.

Deleting a model

When you delete a model, you detach it from the current project, but do not delete the corresponding file from your disk.

Steps To delete a model:

  1. Right-click the model node in the Model Explorer and select Detach From Project from the contextual menu.

    or

    Select the model node in the Model Explorer and press del (or click the Delete tool in the toolbar).

    The model node and all its related items are removed from the current project.

 


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