OpenDSS Bus Interface PDF
OpenDSS Bus Interface PDF
OpenDSS Bus Interface PDF
Bus Interface
Sept 2013
This interface is used to extract the listed values from a Bus object in the active circuit
after the appropriate solution is performed. Most of the properties are readonly as it is
unsafe to define these properties separate from the terminal connection definitions for
circuit elements.
The interface operates on the Active Bus. You can set a bus active using the Buses(i)
property or the SetActiveBus or SetActiveBusi functions in the Circuit interface. Also,
when you set an active circuit element and terminal, the bus connected to that terminal
becomes active.
Properties
Functions
GetUniqueNodeNumber Integer To help avoid collisions of neutral node
(StartNumber:Integer): numbers for specifying connections of circuit
elements, this function returns a node number
that is not being used, Starting at the
StartNode value
ZscRefresh WordBool Refresh Zsc, Ysc values. Execute after a
major change in the circuit. Not necessary
after fault study.
Example
This VBA sub loads the present solution’s node voltages in complex form. If voltage
bases are defined for the buses, the voltages are in per unit. One unique feature of this sub
is that it tacks the node order onto the bus name in column 1. Then it places the voltage(s)
in the cells according to the phase, or node, it corresponds to.
' This Sub loads the per unit complex voltages onto Sheet3 starting in Row 2
iRow = 2
For i = 1 To DSSCircuit.NumBuses ' Cycle through all buses
Set DSSBus = DSSCircuit.Buses(i) ' Set i-th bus active using Buses
' Put values in Variant array into cells in sequence provided by DSS
iCol = 2
With WorkingSheet
For j = LBound(V) To UBound(V) Step 2
iCol = NodeOrder(j / 2) * 2
.Cells(iRow, iCol).Value = V(j)
.Cells(iRow, iCol + 1).Value = V(j + 1)
Next j
End With
iRow = iRow + 1
Next i
End Sub
Result in worksheet:
This is the first few rows of the solution for the IEEE 8500-node test feeder.