SaveCase Function (version 9)

 

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. If an error occurs while trying to save a case, an error message is returned through EString.

SaveCase(fileName, EString, {fileType}, {Overwrite})

 

Parameter Definitions

fileName : String The name of the file you wish to save as, including file path. No default.

EString : Variant This parameter must be assigned a variable declared as a Variant. This parameter is for a return value only, and will assign the passed variable a string representing an error that may have occurred in the Simulator Automation Server. If no error occurred, the EString variable will return an empty string.

fileType : String This parameter is optional. If you desire to save the case in a format other than the current PowerWorld Binary (pwb) format, you must specify the type of format in this parameter as a string. If the parameter is not passed, the format type defaults to the most recent version of PowerWorld binary (pwb) file. If a string is passed for this parameter, it must at least be the "PWB" string. 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"  PTI version 23 (raw)
"PTI24"  PTI version 24 (raw)
"PTI25"  PTI version 25 (raw)
"PTI26"  PTI version 26 (raw)
"PTI27"  PTI version 27 (raw)
"GE"  GE PSLF (epc)
"IEEE"  IEEE common format (cf)
"PWB70"  PowerWorld Binary version 7.0 (pwb)
"PWB"  PowerWorld Binary (most recent) (pwb)

Overwrite : Boolean This parameter is optional. If you do not want to overwrite a file with the same name as passed in filename, you must specify this parameter as False. Default is True.