Function PickFault( ByVal nFltIndex& ) As Long
Purpose: Move output pointer to a specific short circuit simulation case. PickFault() is a simplified version of ShowFault(). All parameters in the previous call to ShowFault() are re-used. Use ShowFault() instead if you wish to control precisely what will be shown on the one-line diagram.
Works in: OneLiner only.
Parameters:
nFltIndex
[in] fault number or
SF_FIRST: first
fault
SF_NEXT: next
fault
SF_PREV: previous
fault
SF_LAST: last
available fault
Return value:
1 success
0 failure
Remarks: This function must be called before any post fault voltage and current result can be retrieved. All subsequent calls to GetSCVoltage and GetSCCurrent functions will return result from the picked short circuit simulation.
Example:
' Must always pick a fault before getting V and I results
If PickFault( 1 ) = 0 Then GoTo HasError
Do
If GetSCCurrent( HND_SC, vdVal1, vdVal2, 4 ) = 0 Then GoTo HasError
Print #1, FaultDescription(); Chr(10); _
" "; _
Format( vdVal1(1), "####0.0"); "@"; Format( vdVal2(1), "#0.0"), Space(5), _
Format( vdVal1(2), "####0.0"); "@"; Format( vdVal2(2), "#0.0"), Space(5), _
Format( vdVal1(3), "####0.0"); "@"; Format( vdVal2(3), "#0.0")
Loop While ShowFault( SF_NEXT, 0, -999, 0, vnShowRelay ) > 0