Getting Data from the Simulator Automation Server
The Output Structure
Most functions called on the SimulatorAuto object returns the same value, Output, which has a well-defined structure.
Output is of type VARIANT, and is an array of VARIANTs. Output is zero-indexed.
The first element always contains any errors occurring during execution. For those functions returning more than one element in the Output array (e.g. ListOfDevices), explanation is provided below when discussing the specific method.
Individual function descriptions will indicate the format and data type of the returned parameters.
Error Handling
When the output format is a variant array of variants as mentioned above, the first item in the Output VARIANT array, Output[0], contains any errors occurring during the function’s execution. If no errors occurred during the function’s execution, Output[0] will be set to an empty BSTR (string) represented in most languages by either ‘’ or "".
Error Format
If an error string is returned when the output format is a variant array of variants, it will be in the following format:
[method name]: [error_explanation]
e.g. RunScriptCommand: Error occurred processing script command – check command syntax