Chapter 4 Models


Workspaces

A workspace contains all the information you need to perform a modeling task with PowerDesigner. It allows you to save your modeling environment in a file with a hierarchy of folders and models. During a work session, every change in the folder or models hierarchy is saved locally in the workspace.

You can create several workspace files on your machine, but you can only work in one workspace at a time. Workspaces are saved in files with an .sws extension. They do not have property sheets

You can create the following new items in a workspace by right-clicking the workspace in the Browser and select New→item:

In addition, you can add existing items (including external files, such as text files or MS Word files, and other PowerDesigner workspaces) to a workspace by right-clicking the workspace in the Browser, selecting Add, browsing to the item, and clicking OK. When you have external files referenced in a workspace, you can open with a double-click.

A PowerDesigner model is the basic work unit, and may contain multiple packages and diagrams. You can use folders in your workspace to organize your models.

Note   Creating a project
You can have a convenient environment for working with multiple interconnected models and other files by creating a project. For information, see the Projects and Framework Matrices chapter.

Modifying the filename of a closed item

To modify the filename of closed models, multi-model reports, or any document type (workspaces or external files) you can right-click the item in the Browser and selecting Properties, the Document Properties dialog box allows you to directly modify the item filename.

Note   Generated models and workspace
It is highly recommended to keep original models and their corresponding generated models in the same workspace.

Creating a workspace

By default, PowerDesigner opens with a workspace. Whether you want to model data in a CDM or generate a multi-model report, there will always be a workspace open in the PowerDesigner window.

To create a new workspace, you have to close the current workspace and a new workspace will be automatically created.

Steps To create a new workspace:

  1. Select File→Close Workspace.

    Confirmation boxes prompt you to save the models before closing the current workspace and opening a new work environment.

Opening a workspace

When you open an existing workspace, the hierarchy of folders and links to model and report files appear in the Browser. The models linked to the workspace are not open by default.

Steps To open a workspace:

  1. Select File→Open Workspace.

    A confirmation message prompts you to save the current workspace.

    A standard file selection dialog box opens.
  2. Select a file with the SWS extension and click OK.

    The new workspace displays the hierarchy of folders, models, and packages defined in this workspace.

Saving a workspace

We recommend that you save your workspace whenever you modify its structure by the creation, addition, modification or deletion of a model, report, or folder. Saving a workspace saves the workspace structure, but not the model or report files it contains. However, you will be prompted to save any new model created in the workspace.

Steps To save a workspace:

  1. Select File→Save Workspace.

Steps To save the workspace under another name:

  1. Select File→Save Workspace As to open a standard Save As dialog.
  2. Type a new name for the workspace and click OK.

    The new workspace is displayed by default.

You can save the workspace and the files it contains.

Steps To save the workspace and its contents:

  1. Select File→Save All.

    The workspace and the model or report files it contains are saved. You are not prompted to save the individual files.

For more information about saving models, see Opening, saving, closing, and deleting models.

Changing workspace

You can change workspace during a work session.

Steps To change workspace:

  1. Select File→Open Workspace.

    A confirmation message prompts you to save the current workspace.

    A standard file selection dialog box is displayed.
  2. Select another workspace and click OK.

    The new workspace environment is displayed.

Deleting a workspace

Deleting a workspace deletes the .sws file, but not the model or report files it contains. If you want to delete a workspace file, you have to use the standard file deletion procedure in Windows Explorer.

Steps To delete a workspace:

  1. Right-click the workspace file in Windows Explorer and select Delete.

 


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