Using the Edit/Run Script Editor

The Edit/Run Script editor runs in the PowerDesigner environment and provides access to the scripting environment. You open it from the Tools > Execute Commands menu. It is available whatever the type of the active model and also when no model is active.

You can see the date and time when the script begins and ends in the Script tab of the Output window located in the lower part of the PowerDesigner main window, if you have used the Output global function.

The Edit/Run Script editor looks like the following:



The following tools and keyboard shortcuts are specific to the Edit/Run Script editor toolbar:

Tool

Description

Keyboard shortcut

Editor Menu Note: When you use the Find feature, the parameter "Regular Expression" allows the use of wildcards in the search expression.

Shift+F11

Edit With. Opens the previously defined default editor or allows you to select another editor if you click the down arrow beside this tool

Ctrl+E

Run. Executes the current script

F5

Metamodel Objects Help provided to allow you to find out which properties and methods can be used to drill down to a PowerDesigner object

Ctrl+F1

For more information on defining a default editor, see Core Features Guide > The PowerDesigner Interface > Customizing Your Modeling Environment > General Options > Specifying Text Editors.

Script Bookmarks

In the Edit/Run Script editor window, you can add and remove bookmarks at specific points in the code and then navigate forwards or backwards from bookmark to bookmark:

Keyboard shortcut

Description

Ctrl+F2

Adds a new bookmark. A blue bookmark box is displayed. If you repeat this action from the same position, the bookmark is deleted and the blue marker disappears

F2

Jumps to bookmark

Shift+F2

Jumps to previous bookmark

Visual Basic

If you have Visual Basic (VB) installed on your machine, you can use the VB interface for your script writing in order to have access to the VB IntelliSense feature that checks all the standard methods and properties that you invoke and suggests the valid alternatives ones that you can choose in order to correct the code. However the PowerDesigner Edit/Run Script editor automatically recognizes VBScript keywords.

The Edit/Run Script editor lets you:

  • Create a script

  • Modify a script

  • Save a script

  • Run a script

  • Use a sample script