How do the key fields and required fields for aux files and copy/paste from Excel work?
Each object type in Simulator (i.e. Loads, Generators, Buses, etc…) has a number of key fields and additional required fields. Key fields are fields that must be included for existing records when pasting data into Simulator from a spreadsheet application such as MS Excel or when loading information from an aux file. Required fields are fields that must be specified (in addition to key fields) when creating new records by pasting data or loading from an aux file.
For example, when pasting data for an existing load record, the bus number and ID (key fields) must be specified with the pasted record in addition to any other field the user is modifying with the pasted data. When creating a new load record, however, the user must paste the load Status, S MW, and S Mvar (required fields) in addition to the above mentioned key fields (click here for more information on creating new records via aux files or by pasting data in from spreadsheet applications.)
The easiest method of determining key/required fields for an object type is to open a case information display, right-click on a record and select Display/Column Options from the resulting local menu. Check the box labeled Highlight Key Fields on the resulting dialog that opens. Key fields are highlighted in yellow, required fields are highlighted in green.
Simulator uses variable names (vice normal column headings) when reading in data from an aux file. There are a number of methods to determine the variable names you should use in your aux files. The easiest method is:
- Open a case in Simulator then open a Case Information Display for the object type you are going to import via the aux file.
- Select Options >> Solution/Environment from the main menu.
- Click on the Case Information Displays tab.
- Select “Use Variable Names” in the section labeled Column Heading Options.
- Click OK to close the options dialog.
- Right-click on the case information display then select Save As >> Auxiliary File from the resulting local menu.
- Specify the file name and directory path in the Save As dialog and click Save.
- Open the file you just created in any text editor and use that file as a template to create your aux file.
You can also select Help >> Export Object Fields from the main menu to obtain either a text file or Excel worksheet listing all available object types by variable name and their corresponding object fields with key and required fields annotated.
One final note: new object records can only be created in Edit Mode. If you attempt to create a new object while in Run Mode, Simulator will not create the record and the message log will display one of the following messages: “Data for (x) records not pasted” or “(x) records skipped when reading file because the object could not be found” where x is the number of new object records you attempted to create.
July 5, 2012