Chapter 4 Models


Opening, saving, closing, and deleting models

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

Opening a model

Steps To open a model not in the present workspace:

  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 workspace and opened in the Browser.

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

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

  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 workspace 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 Browser.

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, click the Save tool, or right-click the model entry in the Browser 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 Browser 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 Browser and select Save As New Model from the contextual menu.

You can save the workspace 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.

Renaming a model

You can rename a model in the Browser.

Steps To rename a model in the Browser:

  1. Select the model node in the Browser.
  2. Click in the selection to make the name editable, 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 workspace to be re-opened:

Steps To close a model:

  1. Select the model node in the Browser.
  2. Select File→Close, or right-click the node and select Close from the contextual menu.

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

    The node in the Browser is tagged with a red dot.

Deleting a model

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

Steps To delete a model:

  1. Select the model node in the Browser.
  2. Click the Delete tool, press DEL, or right-click the node and select Detach From Workspace from the contextual menu.

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

 


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