You are on page 1of 6

GUI_Automation

Page 1 of 6

Reproducing User Actions
A sequence of PSS®E actions for batch commands may be recorded in a Python script (*.py, *.pyc, or *.pyw)
or Response file (*.idv). See Section 23.2, Creating Program Automation Files for details on specific types
of files.

I/O Control > Start recording…

A file selector window opens for specification of the type of file to record and the file name.

I/O Control > Stop recording

When done recording, select I/O Control > Stop recording to close the file.

Creating Program Automation Files
Response File
IDEV

I/O Control > Start recording…

An experienced user can create a response file using a text editor. The simplest and most robust way, however,
is to select the I/O Control > Start recording option. Note that this is equivalent to executing activity ECHO in
previous versions of PSS®E.
Having selected a file, the user executes the required sequence of activities or operations using the menu and
toolbar functions in the interface. The resulting response file will contain, in Response File form, a series of
commands reflecting the user’s sequence of activities. The user can to tailor this basic Response File for
subsequent runs by editing the created response file by changing some of the filenames and bus numbers
specifying faulted nodes, switched branches, and so on.
As an example it can be assumed that, using the savnw.sav power flow case, the user wishes to open one
circuit between buses 151 and 152, solve the case, and then display the power flow results for bus 151.
Using the interface:

Right-click the branch in [Diagram] and select Switch from the pop-up menu.

Employ the Power Flow > Solution > Solve option or the Solve toolbar button.

Select the Bus Based Output toolbar button and, subsequently, bus number 151.

If this series of operations were recorded, a response file would be constructed (see Figure 23-1 Created
Response File).

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

psa/*. It is not possible to construct an IPLAN file using the PSS®E recording facility. Figure 23-2 Select Program Automation File Dialog shows the dialog for selecting an Automation File: mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.irf) and PSAS/PSEB (*. Consequently.pse) command files may be executed from within the user interface. The program records the sequence of events selected by the user in the same manner. These commands are described in the PSS®E API Manual.12. the IPLAN language interface to the PSS®E working case and dynamics data. looping and subroutine calls. 28/05/2015 .idv). requires an intimate familiarity with the PSS®E batch commands. IPLAN programs (*.chm::/G. refer to the IPLAN Program Manual. Running a Response File Python and IPLAN Files The process described in the previous section for creating a Response file can also be used to create a Python file (*. It is very beneficial to be familiar with at least one programming language and the standard programming concepts such as assignment statements. The file must be created manually and compiled. Additional Information PSS®E Program Operation Manual.org.idv).4. For details on the IPLAN programming language. Section 15. looping and subroutine calling are available. The file type is selected.py). For details on the Python programming reference book or http://www. Additional Information PSS®E Program Operation Manual. and the IPLAN compiler.. Alternatively the user can more sophisticated control Standard concepts such as language refer to a Python create a Python file using the Python programming language. Response files (*.python. This will facilitate a of PSS®E by enabling looping and decision making based on results of analyses.GUI_Automation Page 2 of 6 Created Response File It can be seen that the Response file contains PSS®E batch (BAT_) commands. PSS®E will open a file selector window and prompt for the appropriate filename to execute. which could be done with the text editor. Section 15. Python Programs Executing Automation Files Run Automation File I/O Control > Run program Automation file… Existing Python scripts (*.. the manual creation of a Response File.py) by selecting this file type instead of the Response file type (*.

When the selected file is opened.GUI_Automation Page 3 of 6 Select Program Automation File Dialog Only five file types are shown.idv) is used for either (or both). A [Terminal Read] dialog (Figure 23-3 Terminal Read Dialog for Automated Activity) allows specification of data output to a file.chm::/G. so the Response File file type (*.. Clicking [OK] without specifying a filename sends the data to a Report tab. This is because command line input and batch commands can be assembled in the same file. mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp. the processes packaged in the Response file or programmed into the IPLAN or Python file will be initiated. 28/05/2015 ..

Additional Information PSS®E Program Operation Manual.chm::/G. refer to the IPLAN Program Manual. the IPLAN language interface to the PSS®E working case and dynamics data. Building a Response File. 28/05/2015 .GUI_Automation Page 4 of 6 Terminal Read Dialog for Automated Activity IPLAN Program File EXEC Requirements / Prerequisites IPLAN Executable Program File generated by IPLAN language compiler program.pse) from [Select Program Automation File to Run].16.14. Additional Information PSS®E Program Operation Manual. Select the desired IPLAN File (*. Launching an IPLAN Program File PSEB Command File. Dynamic Simulation PSAS mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.pse) Select the desired PSEB Command File (*. Power Flow Calculation PSAS Command File. Section 15... Section 15. and the IPLAN compiler.irf) from [Select Program Automation File to Run]. Power Flow Calculation PSEB Requirements / Prerequisites PSEB Command file (*. For details on the IPLAN programming language.

15. Click [Arguments]. Dynamic Simulation Argument Passing These actions allow arguments to be passed to a response file. The [Terminal Read] dialog (Figure 23-3 Terminal Read Dialog for Automated Activity) allows specification of data output to a file.7. The [Automation Arguments] dialog (Figure 23-4 Automation Arguments Dialog) allows a single line of arguments to be input..2. Click [Open] to run the automation file. Automation Arguments Dialog Additional Information PSS®E Program Operation Manual. Arguments in Response Files Section 15. and click [OK]. The response file will be executed within the PSS®E user interface with results being displayed appropriately to [Spreadsheet] and Report and Progress tabs. Building a Response File. Editing an Automation File mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.psa) from [Select Program Automation File to Run]. Section 15.3. Section 15.7.GUI_Automation Page 5 of 6 Requirements / Prerequisites PSAS Command file (*.7. Clicking [OK] without specifying a filename sends the data to a Report tab. Additional Information PSS®E Program Operation Manual.chm::/G.. 28/05/2015 . Arguments in IPLAN Files Re-Run Last Automation File I/O Control > Re-run program Automation file… When the re-run option is selected.psa) Select the desired PSAS Command File (*.1. the last-run automation file will run again without reselecting it from a file selector window. Arguments in Python Files Section 15. Highlight the desired file on [Select Program Automation File to Run] (Figure 23-2 Select Program Automation File Dialog). Enter the argument string in the text box provided.

Additional Information PSS®E Program Operation Manual.. Section 17. Selecting this item will re-run the last selected program automation file without forcing you to re-select it.GUI_Automation Page 6 of 6 I/O Control > Edit last recorded program Automation file If a text editor has been defined in the [Preferences] dialog (see Changing Program Preferences). the text editor will display the last Automation file run by the program. If this is selected.13. This function provides a mechanism for inserting descriptive comments.. mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp. selecting this option will display the last Automation file recorded by the program. a variety of information is sent to the Progress tab. If this is selected.chm::/G. You may have to refresh the view in the text editor to see the changes in the file. Inserting Comments into the Progress Output This page intentionally left blank. the text editor will display the file as it is created. Insert Text into the Progress Stream Dialog Additional Information PSS®E Program Operation Manual. Comments can be directed to any output device selected for recording the work session (see OPEN). A comment or message is entered directly into the input field in the dialog. I/O Control > Edit last run program Automation file If a text editor has been defined in the [Preferences] dialog. 28/05/2015 . Section 15. selecting this option will display the last Automation file run by the program.16. Recording User Actions Inserting Comments into the Progress Output TEXT Misc > Insert text into the Progress stream (TEXT) During the operation of PSS®E.