Function Run1LPFCommand: INSERTTAPBUS

 

Function Function Run1LPFCommand( sInput$ ) As Long

Purpose: Run OneLiner commands: Network  | Insert tap bus

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 INSERTTAPBUS with attributes in the list below (* denotes required entries, [] denotes default value).

BUSNAME1          (*) Line bus 1 name

BUSNAME2          (*) Line bus 2 name

KV                     (*) Line kV

CKTID                (*) Line circuit ID

PERCENT            (*) Percent distance to tap from bus 1 (must be between 0-100)

TAPBUSNAME      (*) Tap bus name

 

Example:                                                                                          

 

Sub main

  sCmd$ = "<INSERTTAPBUS "        ' Command name

  sCmd = sCmd & "BUSNAME1=""NEVADA"" "    ' Line bus 1 name

  sCmd = sCmd & "BUSNAME2=""CLAYTOR"" "   ' Line bus 2 name

  sCmd = sCmd & "KV=""132"" "             ' Line kV

  sCmd = sCmd & "CKTID=""1"" "            ' Line circuit ID

  sCmd = sCmd & "PERCENT=""30"" "         ' Percent distance from bus 1

  sCmd = sCmd & "TAPBUSNAME=""NEWTAP"" "  ' Tap bus name

  sCmd = sCmd & "/>"

  If 1 <> Run1LPFCommand( sCmd ) Then GoTo hasError

  If 1 <> Run1LPFCommand( "<SAVEDATAFILE PATHNAME =""NewFile.olr"" />" ) Then GoTo hasError

  Print "Success"

  stop

hasError:

  Print "Error: " + ErrorString()

End Sub