Knowledge Base

Example SimAuto Files

Right-click on the file links below and select “Save target as…” to save them to your computer.

SimAuto version 12 (and later)

Microsoft® Visual Basic for Applications Examples

Running from Microsoft® Excel:
Running from Microsoft® Access:

  • ATC Calculator (includes database, cases, and support files)
  • Multi-period Market Simulation (includes database, cases, and support files; unzip files into directory “C:\SimAutoOPF” and open “OPFAutomationForms.mdb”; click here for accompanying training topic)

SimAuto version 10 (and later)

Microsoft® Visual Basic for Applications Example, Running from Microsoft® Excel: SimAutoExampleVB01.xls

Note: You may need to change directory path and/or file name inside application form to point to the proper file and location on your system.

SimAuto Python Examples

The following sample scripts demonstrate the use of some basic SimAuto calls in Python.

Setup for Examples

  1. Install pywin32 using pip or something similar to gain access to the win32com library used to connect to COM objects, such as SimAuto.
  2. Download the script — it is not essential to use SimAuto in Python in general, but provides a simple function that can be used to parse the return data from SimAuto function calls, and is used extensively in the demo scripts.
  3. Unless otherwise noted, the example scripts are designed to work with any case; you simply need to modify the script with the path to the case you wish to use. However, B7Flat.pwb (installed with Simulator) is a small, simple case useful for testing.


  • Cases – Example opening and solving a case.
    • OpenCase()
    • GetCaseHeader()
    • RunScriptCommand()
    • CloseCase()
  • General Data – Example querying general information
    • ListOfDevices()
    • GetSpecificFieldList()
  • Single Element – Example querying and modifying values for a single object
    • GetParametersSingleElement()
    • ChangeParametersSingleElement()
  • Multiple Element – Example querying and modifying values for multiple objects
    • GetParametersMultipleElement()
    • ChangeParametersMultipleElement()
  • Multiple Element Rect – Example querying and modifying values for multiple objects
    • GetParametersMultipleElementRect()
    • ChangeParametersMultipleElementRect()
  • Multiple Element Flat – Example querying and modifying values for multiple objects
    • GetParametersMultipleElementFlatOutput()
    • ChangeParametersMultipleElementFlatInput()
  • N-1 Analysis – Example Contingency Analysis Automation
    •  Longer script that demonstrates how SimAuto can help automate useful tasks
    • For beginner-level explanation, see here.


Tags: ,,

July 31, 2012