Function MakeOutageList ( ByVal nHandle&, ByVal nMaxTiers&, _
ByVal nWantedTypes, ByRef vnList() as long, _
ByRef nListLen& ) As Long
Purpose: Return list of neighboring branches that can be used as outage list in the DoFault function on a bus, branch or relay group.
Works in: OneLiner only.
Parameters:
nHandle [in] Handle number of a bus, relay group or branch.
nMaxTiers [in] Number of tiers (must be positive)
nWantedTypes [in] Branch type. Sum of one or more following values: 1- Line; 2- 2-winding transformer;
4- Phase shifter; 8- 3-winding transformer; 16- Switch
vnList [out] outage list (with zero in the last element).
nListLen [in] Length of vnList array
[out] Number of outage branches found.
Return value:
0 Failure
1 Success
Remarks: Calling this function with 0 in place of vnList will let you determine the number of outage branches found within the number of tiers specified.
Example:
Sub main
If GetEquipment( TC_PICKED, PickedHnd& ) = 0 Or _
(EquipmentType( PickedHnd& ) <> TC_BUS And EquipmentType( PickedHnd& ) <> TC_RLYGROUP) Then
Print "Please select a bus or a relay group"
Stop
End If
Call MakeOutageList(PickedHnd, 0, 1+2+4+8+16, 0, nListLen& )
Print nListLen
dim vnList(20) As long
nListLen& = 20
Call MakeOutageList(PickedHnd, 0, 1+2+4+8+16, vnList, nListLen& )
Print nListLen
For ii = 1 to nListLen
nHnd& = vnList(ii)
Print PrintObj1LPF(nHnd)
Next
exit Sub
HasError:
Print GetErrorStr()
End Sub