SaveCase Function
The SaveCase function is used to save a case previously loaded in the Simulator Automation Server using the OpenCase function. The function allows you to specify a file name and a format for the save file.
Function Prototype
SaveCase(FileName, FileType, Overwrite)
Parameter Definitions
FileName : String The name of the file you wish to save as, including file path.
FileType : String A string indicating the format of the written case file. An empty string will return an error. The following list is the currently supported list of string identifiers and the file types they represent.
"PTI23" - "PTI35" specific PTI version (raw)
"GE14" - "GE23" GE PSLF version (epc)
"IEEE" IEEE common format (cf)
"UCTE" UCTE Data Exchange (uct)
"AUXNETWORK" PowerWorld Auxiliary format (aux) saving only network data. This is the recommended auxiliary file type.
When saving an auxiliary file, the following file types are supported for compatibility with existing processes that users might have in place, but the recommended option is "AUXNETWORK".
"AUX" PowerWorld Auxiliary format (aux).
"AUXSECOND" PowerWorld Auxiliary format (aux) using secondary key fields.
"AUXLABEL" PowerWorld Auxiliary format (aux) using labels as key field identifiers.
"PWB5" - "PWB24" specific PowerWorld Binary version (pwb)
"PWB" PowerWorld Binary (most recent) (pwb)
Overwrite : Boolean A Boolean value which indicates whether to overwrite a file if FileName already exists. If Overwrite is set to false and the file specified by FileName already exists, SaveCase will return an error message and do nothing to the file.
Output
SaveCase returns only one element in Output—any errors that may have occurred when attempting to save the case.