Function Function Run1LPFCommand( sInput$ ) As Long
Purpose: Run OneLiner command: File | Export network data command.
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 EXPORTRELAY with attributes in the list below (* denotes required entries, [] denotes default value).
FORMAT Output format: [RAT]-ASPEN RAT;
SCOPE Export scope: [0]-Entire network; 1-Area number; 2- Zone number; 3-Invicinity of a bus
AREANO Export area number (*required when SCOPE=1)
ZONENO Export zone number (*required when SCOPE=2)
SELECTEDOBJ Selected bus (*required when SCOPE=3). Must be a string with following content
PICKED - Selected bus on the 1-line diagram
'BusName' kV - Bus name in single quotes and kV separated by space
TIERS [0] Number of tiers (ignored when SCOPE<>3)
DEVICETYPE Device type to export. Comma delimied list of the following:
OC: Overcurrent
DS: Distance
RC: Recloser
VR: Voltage relay
DIFF: Differential relay
SCHEME: Logic scheme
COORDPAIR: Coorination pair
[OC,DS,RC,VR,DIFF,COORDPAIR,SCHEME]
LASTCHANGEDDATE [01-01-1986] Cutoff last changed date
RATPATHNAME (*) full valid pathname of ouput RAT file
Example:
Sub main
sExportFile$ = GetOlrFileName() & ".rat"
sInput$ = "<EXPORTRELAY " & _
"RATPATHNAME=""" & sExportFile & """ " & _
"SCOPE= ""3"" SELECTEDOBJ=""'CLAYTOR' 132"" " & _
"DEVICETYPE= ""OC,DS"" " & _
" />"
Print sInput
If Run1LPFCommand( sInput ) Then
Print "Success: output in " & sExportFile
Else
Print "Error: " & ErrorString()
End If
End Sub