Function ReadChangeFile

 

Function ReadChangeFile( ByRef sFileName$, ByVal nFlag& ) As Long

Purpose: Read a change file.

Works in:      OneLiner and Power Flow.

Parameters:     

sFileName    [in] Path name of the change file.

nFlag          [in] Silent mode: 0- false; 1- true; 2- true, save TTY log

Return value:

0               No error or warning

N               N = 1000*No or errors + No of warnings

Important Remarks:      ReadChangeFile function will reset the script engine handle table, which will invalidate all handles that exist up to this point in the script program execution. For this reason user cannot re-use any of them in subsequence script calculation.

Remarks:       Set nFlag to True to accept all changes in the change file without having to confirm each one separately. If Save TTY log is on, the content of TTY output generated by the read change file operation will be saved to a text file with default name: PowerScriptTTYLog.txt in the Windows %TEMP% folder.

Example:

 

Sub main

  CHFPath$ = "h:\data\\dd_linemu_s.CHF"

  rCode = ReadChangeFile( CHFPath, 2 )

  Print "RCode = " & Str(rCode) & Chr(13) & Chr(10) _

          & "TTY output had been saved in file: " _

          & GetWindowsEnvironmentVariable( "TEMP" ) & "\PowerScriptTTYLog.txt"

End Sub