Function Function Run1LPFCommand( sInput$ ) As Long
Purpose: Run OneLiner commands: Faults | Solution Report.
Works in: OneLiner.
Parameters:
sInput [in] XML string, or full path name to XML file, containing XML node as described in Remarks section below.
Return value:
1 Success
0 Failure
Remarks: sInput must include XML node FAULTSOLUTIONREPORT with attributes in the list below (* denotes required entries, [] denotes default value).
REPORTPATHNAME (*) full valid path to report file
OUTFILETYPE [2] Output file type 1- TXT; 2- CSV
CASERANGE [0] Comma delimited list of case index numbers. For example 1,5-10.
0 - Current case
PERUNITIZ [0] Unit of current and impedance 1- Per-unit; 0- Amps and ohms
PERUNITV [1] Unit of voltage 1- Per-unit; 0- kV, L-G
TIER Report scope: Number of tiers from the faulted bus
BUSLIST Report scope: List of additional buses. This attribute is ignored if TIER is found
MONITORBRANCH1 Report scope: Monitored branch 1 location string (OneLiner Help section 10.2)
BNO1;'BNAME1';KV1;BNO2;'BNAME2';KV2;'CKT';BTYP;
This attribute is ignored if TIER or BUSLIST is found.
MONITORBRANCH2 Report scope: Monitored branch 2 location string.
MONITORBRANCH3 Report scope: Monitored branch 3 location string.
HEADING Additional text to appear on the header of report
LISTEQUIPMENT List deleted and outagd equipment in the report [0] - NO; 1 - YES
Example:
Sub main
sExportFile$ = GetOlrFileName() & ".csv"
sInput$ = "<FAULTSOLUTIONREPORT " & _
"REPORTPATHNAME=""" & sExportFile & """ " & _
"OUTFILETYPE=""2"" " & _
"CASERANGE=""1,3-5"" " & _
"PERUNITIZ=""0"" " & _
"PERUNITV=""0"" " & _
"TIER=""0"" " & _
"BUSLIST=""'ALASKA',33;'HAWAII',33;"" " & "/>"
If Run1LPFCommand( sInput ) Then
Print "Success: output in " & sExportFile
Else
Print "Error: " & ErrorString()
End If
End Sub