Accessing Simulator Fields in SimAuto
You can access just about any value in Simulator in SimAuto with the correct object and field name. The easiest way to find the object and field names is through the Model Explorer.
First, find and add the field you’re interested in to the Model Explorer. You can do this a couple of different ways, but one way is to use the ‘Fields’ pane in the Model Explorer. You can either navigate the tree or search for the field. Then, you can drag it into the records in the right pane to add it to the Case Information Display. In the screenshot below, I have added the ‘Regulation Sensitivity’ field from the Transformer folder in the Branch records to the Transformer Case Information Display. It is added as the column named ‘XF Sensitivity’.
After the field is added, you can change the headings in the Model Explorer so that the internal variable name that we use for SimAuto and AUX files is shown as the column header instead of the “pretty” name that’s usually shown. This is done by clicking the ‘Options’ button in the toolbar and choosing ‘Headings -> Variable Names’.
Once the headings have been changed, you will see the field names that you need for a data request in SimAuto. For example, the transformer sensitivity field is shown as ‘RegSens’.
The sample SimAuto script below accesses the ‘BusNumFrom’, ‘BusNumTo’, ‘Circuit’, and ‘RegSens’ fields and prints them. Getting more fields is a matter of looking up the field name and adding them to the request. You can limit the results returned by adding a filter (the last, currently empty value in the GetParametersMultipleElement call).
import win32com.client import sys simauto = win32com.client.Dispatch("pwrworld.SimulatorAuto") def GetBranchXFSens(simauto, casepath): (err,) = simauto.OpenCase(casepath) (err, data) = simauto.GetParametersMultipleElementRect('BRANCH',['BusNumFrom', 'BusNumTo', 'Circuit', 'RegSens'], '') for l in data: (frombus, tobus, circuit, sens) = l print(frombus.strip(), tobus.strip(), circuit, sens) GetBranchXFSens(simauto, '<insert path to your case here>') simauto = None
You can find documentation on AUX script commands in the AUX file format doc, and SimAuto functions in the WebHelp in the “Automation Server Add-on (SimAuto)” section
Tags:
May 23, 2025