Preview Tab

Click the Preview tab in the property sheet of the model, packages, and various other model objects in order to view the code that will be generated for it.

The following tools are available on the Preview tab toolbar:

Tools

Description

Editor Menu [Shift+F11] - Contains the following commands:
  • New [Ctrl+N] - Reinitializes the field by removing all the existing content.
  • Open... [Ctrl+O] - Replaces the content of the field with the content of the selected file.
  • Insert... [Ctrl+I] - Inserts the content of the selected file at the cursor.
  • Save [Ctrl+S] - Saves the content of the field to the specified file.
  • Save As... - Saves the content of the field to a new file.
  • Select All [Ctrl+A] - Selects all the content of the field.
  • Find... [Ctrl+F] - Opens a dialog to search for text in the field.
  • Find Next... [F3] - Finds the next occurence of the searched for text.
  • Find Previous... [Shift+F3] - Finds the previous occurence of the searched for text.
  • Replace... [Ctrl+H] - Opens a dialog to replace text in the field.
  • Go To Line... [Ctrl+G] - Opens a dialog to go to the specified line.
  • Toggle Bookmark [Ctrl+F2] Inserts or removes a bookmark (a blue box) at the cursor position. Note that bookmarks are not printable and are lost if you refresh the tab, or use the Show Generation Options tool
  • Next Bookmark [F2] - Jumps to the next bookmark.
  • Previous Bookmark [Shift+F2] - Jumps to the previous bookmark.

Edit With [Ctrl+E] - [OOM only] Opens the previewed code in an external editor. Click the down arrow to select a particular editor or Choose Program to specify a new editor. Editors specified here are added to the list of editors available at Tools > General Options > Editors.

Save [Ctrl+S] - Saves the content of the field to the specified file.

Print [Ctrl+P] - Prints the content of the field.

Find [Ctrl+F] - Opens a dialog to search for text.

Cut [Ctrl+X], Copy [Ctrl+C], and Paste [Ctrl+V] - Perform the standard clipboard actions.

Undo [Ctrl+Z] and Redo [Ctrl+Y] - Move backward or forward through edits.

Refresh [F5] - Refreshes the Preview tab.

You can debug the GTL templates that generate the code shown in the Preview tab. To do so, open the target or extension resource file, select the Enable Trace Mode option, and click OK to return to your model. You may need to click the Refresh tool to display the templates.

Select Generation Targets [Ctrl+F6] - Lets you select additional generation targets (defined in extensions), and adds a sub-tab for each selected target. For information about generation targets, see Customizing and Extending PowerDesigner > Extension Files > Extending Generation and Creating Separate Generation Targets.

Show Generation Options [Ctrl+W] - Opens the Generation Options dialog, allowing you to modify the generation options and to see the impact on the code.



Ignore Generation Options [Ctrl+D] - [PDM only] Ignores changes to the generation options made with the Show Generation Options tool.