Running a VBScript File

You can run a VBScript file from PowerDesigner.

Open a script and click the Run tool or the Run button.

The script is executed and the Output window located in the lower part of the PowerDesigner main window shows the execution progress if you have used the Output global function that lets you display execution progress and errors in the Script tab.

If a compilation error occurs, a message box is displayed to inform you of the kind of error. A brief description error also is displayed in the Result pane of the Edit/Run Script dialog box and the cursor is set at the error position.

The Edit/Run Script editor supports multiple levels of Undo and Redo commands. However, if you run a script that modifies objects in several models, you must use the Undo or Redo commands in each of the models called by the script.

Note: In order to avoid application abortions, you can catch errors using the On Error Resume Next statement. But you cannot catch errors with this statement when you use the im_Abort interactive mode.

You can also insert and customize commands in the Tools menu that will allow you to automatically launch your own scripts.

For more information on customizing commands, see Customizing PowerDesigner Menus Using Add-Ins.