Direct Connection Shared Library (DLL) For Opendss: Activeclass Interface
Direct Connection Shared Library (DLL) For Opendss: Activeclass Interface
for OpenDSS
Davis Montenegro
Last update 10-28-2020
The direct connection shared library is a DLL that implements the same classes, properties and
methods of the OpenDSS-PM COM interface. This alternative was generated to accelerate the In-
process co-simulation between OpenDSS and external software when the client software does not
support early bindings connection to COM servers/controls.
Normally, high level programming languages do not support early bindings, which make them use
late bindings for data exchanging with COM servers. Late bindings procedures add an important
overhead to the co-simulation process specially when executing loops.
So, if your programming language does not support early bindings connection with COM servers,
this is the library you should use to accelerate your simulations. This library is called
OpenDSSDDirect.dll, and can be accessed directly without needing to register it into the OS registry.
However, if your programming language supports early bindings, keep using the COM interface, the
simulation speed will be accelerated naturally when using this connection procedure instead of late
bindings.
The properties implemented in this library are the same implemented in the COM interface, so, this
manual can be used as a reference manual for the classes, properties and methods included in the
COM interface.
ActiveClass Interface
This interface implements the ActiveClass (IActiveClass) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the ActiveClass Class where the values
are integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the ActiveClass Class where the values
are strings. The structure of the interface is as follows:
This interface returns a string, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the ActiveClass Class where the values
are Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: ActiveClass.AllNames
This parameter gets a variant array of strings consisting of all element names in the active Class.
InitAndGetYparams Interface
This interface initializes the YMatrix of the system in case of being necessary. It must be executed
before executing the interface GetCompressedYMatrix to reduce the possibility of errors. The
structure of this interface is as follows:
GetCompressedYMatrix Interface
This interface gets the YMatrix of the system in a reduced format by delivering the pointers of row,
column and matrix values. The structure of this interface is as follows:
Void GetCompressedYMatrix(uint32 hY, uint32 nBus, uint32 nNz, uint32 ColPtr, uint32 RowIdx,
uint32 cVals);
ZeroInjCurr Interface
This interface commands to OpenDSS to initialize currents vector as an array of zeros, which is
basically the first step in the solution algorithm (DoNormalSolution routine). The structure of this
interface is as follows:
Void ZeroInjCurr();
GetSourceInjCurrents Interface
This interface commands to OpenDSS to include the currents injected by voltage/current sources
into the currents vector, following the procedure proposed in the solution algorithm
(DoNormalSolution routine). The structure of this interface is as follows:
Void GetSourceInjCurrents();
GetPCInjCurr Interface
SystemYChanged Interface
This interface reads/writes the variable SystemYChanged (Boolean), which is used in the
DoNormalSolution routine. Using this variable, the Y matrix will be recalculated for the next solution
iteration. The structure of this interface is as follows:
Depending on the value provided in the variable parameter, this interface will deliver the current
value of SystemYChanged or will set the value specified in the variable argument.
BuildYMatrixD Interface
This interface executes the procedure BuildYMatrix, which is used in the DoNormalSolution routine
to rebuild the Y Matrix. The structure of this interface is as follows:
The values of BuildOps (SERIESONLY=1, WHOLEMATRIX=2) and AllocateVI (TRUE=1, FALSE=0) will
have the same effects and interpretation of the function implemented within the OpenDSS code.
UseAuxCurrents Interface
This interface reads/writes the variable UseAuxCurrents (Boolean), which is used in the
DoNormalSolution routine. The structure of this interface is as follows:
Depending on the value provided in the variable parameter, this interface will deliver the current
value of UseAuxCurrents or will set the value specified in the variable argument.
This interface executes the procedure AddInAuxCurrents, which is used in the DoNormalSolution
routine to rebuild the Y Matrix. The structure of this interface is as follows:
The value of SType (NEWTONSOLVE=1, NORMALSOLVE=0) will have the same effects and
interpretation of the function implemented within the OpenDSS code.
getIpointer Interface
This interface delivers the pointer to the vector of currents used within the solution routine of
OpenDSS. The structure of this interface is as follows:
getVpointer Interface
This interface delivers the pointer to the vector of Voltages used within the solution routine of
OpenDSS. The structure of this interface is as follows:
SolveSystem Interface
This interface executes the procedure SolveSystem used in the solution routine of OpenDSS. The
structure of this interface is as follows:
The variable VVectorPtr must contain the pointer to the vector of Voltages provided by the interface
getVpointer.
Bus Interface
This interface implements the Bus (IBus) interface of OpenDSS by declaring 4 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: Bus.NumNodes
This parameter returns the number of nodes of this bus.
Parameter 1: Bus.ZscRefresh
This parameter recomputes Zsc for active bus for present circuit configuration. Return 1 if the
procedure was successful.
Parameter 2: Bus.Coorddefined
This parameter returns 1 if a coordinate has been defined for this bus; otherwise, it will return 0.
Parameter 3: Bus.GetUniqueNodeNumber
This parameter returns a unique node number at the active bus to avoid node collisions and adds it
to the node list for the bus. The start number can be specified in the argument.
Parameter 4: Bus.N_Customers
This parameter returns the total number of customers served down line from this bus.
Parameter 5: Bus.SectionID
This parameter returns the integer ID of the feeder section in which this bus is located.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number (64 bits) according to the number sent in the variable
“parameter”. The parameter can be one of the following:
Parameter 0: Bus.kVBase
This parameter returns the base voltage at bus in kV.
Parameter 1: Bus.X - read
This parameter returns the X coordinate for the bus.
Parameter 2: Bus.X - Write
This parameter allows to write the X coordinate for the bus. Returns 0.
Parameter 3: Bus.Y - read
This parameter returns the Y coordinate for the bus.
Parameter 4: Bus.Y - Write
This parameter allows to write the Y coordinate for the bus. Returns 0.
Parameter 5: Bus.Distance
This parameter returns the distance from the energymeter (if non-zero).
Parameter 6: Bus.Lambda
This parameter returns the accumulated failure rate downstream from this bus; faults per year.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Bus.Name
This parameter returns the name of the active bus.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a variant according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Capacitors Interface
This interface implements the Capacitors (ICapacitors) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the Capacitors Class where the values
are integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Capacitors Class where the values
are doubles. The structure of the interface is as follows:
This interface returns a floating point number (64 bits), the variable “parameter” is used to specify
the property of the class to be used and the variable “argument” can be used to modify the value
of the property when necessary. Reading and writing properties are separated and require a
different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Capacitors Class where the values
are Strings. The structure of the interface is as follows:
This interface returns a string, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Capacitors Class where the values
are Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: Capacitors.AllNames
This parameter gets a variant array of strings with all Capacitor names in the circuit.
Parameter 1: Capacitors.States read
This parameter gets a variant array of integers [0..numsteps-1] indicating the state of each step. If
value is -1 and error has occurred.
Parameter 2: Capacitors.States write
This parameter sets a variant array of integers [0..numsteps-1] indicating the state of each step. If
value is -1 and error has occurred.
CapControls Interface
This interface implements the CapControls (ICapControls) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: CapControls.First
This parameter sets the first CapControl active. Returns 0 if no more.
Parameter 1: CapControls.Next
This parameter sets the next CapControl active. Returns 0 if no more.
Parameter 2: CapControls.Mode read
This parameter gets the type of automatic controller (see manual for details).
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number (64 bits) with the result of the query according to the
value of the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: CapControls.AllNames
This parameter gets a variant array of string with all CapControl names.
Circuit Interface
This interface implements the Circuit (ICIrcuit) interface of OpenDSS by declaring 4 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: Circuit.NumCktElements
This parameter will deliver the number of CktElements included in the active circuit.
Parameter 1: Circuit.NumBuses
This parameter will deliver the number of buses included in the active circuit.
Parameter 2: Circuit.NumNodes
This parameter will deliver the number of nodes included in the active circuit.
Parameter 3: Circuit.FirstPCElement
This parameter sets the first PCElement to be the active PCElement, as a result, this parameter will
deliver the index of the active PCElement (ideally 1).
Parameter 4: Circuit.NextPCElement
This parameter sets the next PCElement to be the active PCElement, as a result, this parameter will
deliver the index of the active PCElement (if there is no more it will return a 0).
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number (IEEE754 64 bits) according to the number sent in the
variable “parameter”. The parameter can be one of the following:
Parameter 0: Circuit.Capacity
This parameter returns the total capacity of the active circuit. Or this parameter it is necessary to
specify the start and increment of the capacity in the arguments argument1 and argument2
respectively.
This interface returns a string according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Circuit.Name
This parameter returns the name of the active circuit.
Parameter 1: Circuit.Disable
This parameter allows to disable an element of the active circuit, the element must be specified by
name. As a result, this parameter will deliver the string “Ok”.
Parameter 2: Circuit.Enable
This parameter allows to enable an element of the active circuit, the element must be specified by
name. As a result, this parameter will deliver the string “Ok”.
Parameter 3: Circuit.SetActiveElement
This parameter allows to activate an element of the active circuit, the element must be specified by
name. As a result, this parameter will deliver a string with the index of the active element.
Parameter 4: Circuit.SetActiveBus
This parameter allows to activate a bus of the active circuit, the bus must be specified by name. As
a result, this parameter will deliver a string with the index of the active Bus.
Parameter 5: Circuit.SetActiveClass
This parameter allows to activate a Class of the active circuit, the Class must be specified by name.
As a result, this parameter will deliver a string with the index of the active Class.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a variant according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Circuit.Losses
This parameter returns an array of doubles (two doubles for representing a complex number) with
the total losses of the active circuit. Argument2 must be 0.
Parameter 1: Circuit.LineLosses
This parameter returns an array of doubles (two doubles for representing a complex number) with
the total Line losses of the active circuit. Argument2 must be 0.
Parameter 2: Circuit.SubstationLosses
This parameter returns an array of doubles (two doubles for representing a complex number) with
the total transformer losses of the active circuit. Argument2 must be 0.
CktElement Interface
This interface implements the CktElement interface of OpenDSS by declaring 4 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: CktElement.NumTerminals
This parameter will deliver the number of terminals of the active DSS object.
Parameter 1: CktElement.NumConductors
This parameter will deliver the number of conductors of the active DSS object.
Parameter 2: CktElement.NumPhases
This parameter will deliver the number of phases of the active DSS object.
Parameter 3: CktElement.Open
This parameter will open the specified terminal (Argument) of the active DSS object.
Parameter 4: CktElement.Close
This parameter will close the specified terminal (Argument) of the active DSS object.
Parameter 5: CktElement.IsOpen
This parameter will return a 1 if any terminal of the active DSS object is open, otherwise, it will return
a 0.
Parameter 6: CktElement.NumProperties
This parameter will return the number of properties of the active DSS object.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a float (IEEE 754 64 bits) with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string (pAnsiChar) with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: CktElement.Name
This parameter delivers the full name of the active circuit element.
Parameter 1: CktElement.Display - read
This parameter displays the name of the active circuit element (not necessarily unique).
Parameter 2: CktElement.Display - write
This parameter allows to modify the name of the active circuit element (not necessarily unique).
Parameter 3: CktElement.GUID
This parameter delivers the unique name for the active circuit element.
Parameter 4: CktElement.EnergyMeter
This parameter delivers the name of the EnergyMeter linked to the active circuit element.
Parameter 5: CktElement.Controller
This parameter delivers the Full name of the i-th controller attached to the active circuit element.
The i-th controller index must be specified in the argument arg. Ex: Str = Controller(2). See
NumControls to determine valid index range.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a variant (the format depends on the parameter) with the result of the query
according to the value of the variable Parameter, which can be one of the following:
CmathLib Interface
This interface implements the CmathLib (ICmathLib) interface of OpenDSS by declaring 2 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
Parameter 0: CmathLib.Cabs
This parameter returns the absolute value of complex number given in real (Argument1) and
imaginary (Argument2) doubles.
Parameter 1: CmathLib.Cdang
This parameter returns the angle, in degrees, of a complex number specified as two doubles: Real
part (Argument1) and imaginary part (Argument2).
CmathLibV (Variant) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: CmathLib.cmplx
This parameter convert real (Argument1) and imaginary (Argument1) doubles to variant array of
doubles.
CtrlQueue Interface
This interface implements the CtrlQueue (ICtrlQueue) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the CtrlQueue Class where the values
are integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: CtrlQueue.ClearQueue
This parameter clears the control queue.
Parameter 1: CtrlQueue.Delete
This parameter deletes a control action from the DSS control queue by referencing the handle of
the action (Argument).
Parameter 2: CtrlQueue.NumActions
This parameter gets the number of actions on the current action list (that have been popped off
the control queue by CheckControlActions).
Parameter 3: CtrlQueue.Action
This parameter sets the active action by index (argument).
Parameter 4: CtrlQueue.ActionCode
This parameter gets the code for the active action. Long integer code to tell the control device
what to do.
Parameter 5: CtrlQueue.DeviceHandle
This parameter gets the handle (user defined) to device that must act on the pending action.
Parameter 6: CtrlQueue.Push
This parameter pushes a control action onto the DSS control queue by time, action code, and
device handle. Returns Control Queue handle.
Parameter 7: CtrlQueue.Show
This parameter shows the entire control queue in CSV format.
This interface can be used to read/modify the properties of the CtrlQueue Class where the values
are Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: CtrlQueue.CtrlQueue
This parameter delivers the control actions contained in the CtrlQueue after the latest solve
command.
DSS Interface
This interface implements the DSS interface (IDSS) of OpenDSS by declaring 3 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: DSS.NumCircuits
This parameter gets the number of circuits currently defined.
Parameter 3: DSS.Start
This parameter validates the user and start the DSS. Returns TRUE (1) if successful.
Parameter 4: DSS.NumClasses
This parameter gets the number of DSS intrinsic classes.
Parameter 5: DSS.NumUserClasses
This parameter gets the number of user-defined classes.
Parameter 6: DSS.Reset
This parameter resets DSS initialization for restarts, etc. from applets.
Parameter 7: DSS.AllowForms read
This parameter gets if the DSS allows forms (1) or not (0), default (1).
Parameter 8: DSS.AllowForms write
This parameter sets if the DSS allows forms (1) or not (0), default (1).
DSSS (String) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: DSS.NewCircuit
This parameter makes a new circuit, the name of the circuit must be specified in the Argument.
Parameter 1: DSS.Version
This parameter gets the version string for the DSS.
Parameter 2: DSS.DataPath read
This parameter gets the Data File Path. Default for reports, etc. from DSS.
Parameter 3: DSS.DataPath write
This parameter sets the Data File Path. Default for reports, etc. from DSS.
Parameter 4: DSS.DefaultEditor
This parameter gets the path name for the default text editor.
DSSV (Variant) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: DSS.Classes
This parameter gets the list of DSS intrinsic classes (names of the classes).
Parameter 1: DSS.UserClasses
This parameter gets list of user-defined classes (names of the classes).
DSSElement Interface
This interface implements the DSSElement (IDSSElement) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the DSSElement Class where the values
are integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: DSSElement.NumProperties
This parameter gets the number of properties for the active DSS object.
This interface can be used to read/modify the properties of the DSSElement Class where the values
are Strings. The structure of the interface is as follows:
This interface returns a string, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: DSSElement.Name
This parameter gets the full name of the active DSS object (general element or circuit element).
This interface can be used to read/modify the properties of the DSSElement Class where the values
are Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: DSSElement.AllPropertyNames
This parameter gets a variant array of strings containing the names of all properties for the active
DSS object.
DSSProgress Interface
This interface implements the DSSProgress (IDSSProgress) interface of OpenDSS by declaring 2
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: DSSProgress.PctProgress
This parameter sets the percent progress to indicate [0..100].
Parameter 1: DSSProgress.Show
This parameter shows progress form with null caption and progress set to zero.
Parameter 2: DSSProgress.Close
This parameter closes (hides) DSS Progress form.
DSSProgressS (String) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: DSSProgress.Caption
This parameter sets the caption to appear on the bottom of the DSS Progress form.
DSSProperties Interface
This interface implements the DSSproperties (IDSSProperties) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
DSSProperties Interface
This interface can be used to read/write certain properties of DSS objects. The structure of the
interface is as follows:
This interface returns a string pointer (ANSI) with the result of the query according to the value of
the variable Parameter, which can be one of the following:
Parameter 0: DSSProperties.Name
This parameter will deliver the name of the active property. This parameter will deliver the name of
the active property. The index of the property must be specified in the argument. The index
minimum value is 1. This value must be entered as string.
Parameter 1: DSSProperties.Description
This parameter will deliver the description of the active property. This parameter will deliver the
name of the active property. The index of the property must be specified in the argument. The index
minimum value is 1. This value must be entered as string.
Parameter 2: DSSProperties.Value - read
This parameter will deliver the value of the active property. This parameter will deliver the name of
the active property. The index of the property must be specified in the argument. The index
minimum value is 1. This value must be entered as string.
Parameter 3: DSSProperties.Value - Write
This parameter will allow to set the value of the active property. The new value must be specified
in the variable “argument” as string. This parameter will deliver the name of the active property.
The index of the property must be specified in the argument. The index minimum value is 1. This
value must be entered as string.
DSS_Executive Interface
This interface implements the DSS_Executive (IDSS_Executive) interface of OpenDSS by declaring 2
procedures for accessing the different properties included in this interface.
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Executive.NumCommands
This parameter gets the number of DSS Executive Commands.
Parameter 1: Executive.NumOptions
This parameter gets the number of DSS Executive Options.
DSS_ExecutiveS (Float) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Executive.Command
This parameter gets i-th command (specified in the argument as string).
Parameter 1: Executive.Option
This parameter gets i-th option (specified in the argument as string).
Parameter 2: Executive.CommandHelp
This parameter gets help string for i-th command (specified in the argument as string).
Parameter 3: Executive.OptionHelp
This parameter gets help string for i-th option (specified in the argument as string).
Parameter 4: Executive.OptionValue
This parameter gets present value for i-th option (specified in the argument as string).
Error Interface
This interface implements the Error interface of OpenDSS by declaring 2 procedures for accessing
the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
int32_t ErrorCode(void );
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
CStr ErrorDesc(void );
This interface returns a string with description of the latest error code delivered by OpenDSS.
Fuses Interface
This interface implements the Fuses (IFuses) interface of OpenDSS by declaring 4 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: Fuses.Count
This parameter returns the number of Fuses objects currently defined in the active circuit.
Parameter 1: Fuses.First
This parameter sets the first Fuse to be the active Fuse. Returns 0 if none.
Parameter 2: Fuses.Next
This parameter sets the next Fuse to be the active Fuse. Returns 0 if none.
Parameter 3: Fuses.MonitoredTerm read
This parameter gets the terminal number to switch the fuse is connected.
Parameter 4: Fuses.MonitoredTerm write
This parameter sets the terminal number to switch the fuse is connected.
Parameter 5: Fuses.SwitchedTerm read
This parameter gets the terminal number of the terminal containing the switch controlled by the
fuse.
Parameter 6: Fuses.SwitchedTerm write
This parameter sets the terminal number of the terminal containing the switch controlled by the
fuse.
Parameter 7: Fuses.Open
Manual opening of fuse.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Fuses.AllNames
This parameter gets the variant array of string containing names of all fuses in the circuit.
Generators Interface
This interface implements the Generators (IGenerators) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: Generators.First
This parameter sets first generator to be active. Returns 0 if None.
Parameter 1: Generators.Next
This parameter sets next generator to be active. Returns 0 if None.
Parameter 2: Generators.ForcedON read
This parameter returns 1 if the generator is forced ON regardless of other dispatch criteria;
otherwise, returns 0.
Parameter 3: Generators.ForcedON Write
This parameter allows to force ON regardless of other dispatch criteria. To force ON put 1 in the
argument, otherwise put 0.
Parameter 4: Generators.Phases read
This parameter returns the number of phases of the active generator.
Parameter 5: Generators.Phases Write
This parameter sets the number of phases (argument) of the active generator.
Parameter 6: Generators.Count
This parameter returns the number of generators Objects in Active Circuit.
Parameter 7: Generators.Idx read
This parameter gets the active generator by Index into generators list. 1..Count.
Parameter 8: Generators.Idx Write
This parameter sets the active generator (argument) by Index into generators list. 1..Count.
Parameter 9: Generators.Model read
This parameter gets the active generator Model (see Manual for details).
Parameter 10: Generators.Model Write
This parameter sets the active generator Model (see Manual for details).
GeneratorsF (Float) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string as a result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant as a result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Generators.AllNames
This parameter gets the array of names of all Generator objects.
Parameter 1: Generators.RegisterNames
This parameter gets the array of names of all generator Energy Meter registers.
Parameter 2: Generators.RegisterValues
This parameter gets the array of values in generator Energy Meter registers.
Isources Interface
This interface implements the ISources (IIsources) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: Isources.Count
This parameter returns the number of Isource objects currently defined in the active circuit.
Parameter 1: Isources.First
This parameter sets the first ISource to be active; returns 0 if none.
Parameter 2: Isources.Next
This parameter sets the next ISource to be active; returns 0 if none.
IsourcesF (Float) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Isources.AllNames
This parameter gets the variant array of string containing names of all ISources in the circuit.
This interface can be used to read/modify the properties of the Lines Class where the values are
integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: Lines.First
This parameter sets the first element active. Returns 0 if no lines. Otherwise, index of the line
element.
Parameter 1: Lines.Next
This parameter sets the next element active. Returns 0 if no lines. Otherwise, index of the line
element.
Parameter 2: Lines.Phases read
This parameter gets the number of phases of the active line object.
Parameter 3: Lines.Phases write
This parameter sets the number of phases of the active line object.
Parameter 4: Lines.NumCust
This parameter gets the number of customers on this line section.
Parameter 5: Lines.Parent
This parameter gets the parents of the active Line to be the active Line. Return 0 if no parent or
action fails.
Parameter 6: Lines.Count
This parameter gets the number of Line Objects in Active Circuit.
Parameter 7: Lines.Units read
This parameter gets the units of the line (distance, check manual for details).
Parameter 8: Lines.Units write
This parameter sets the units of the line (distance, check manual for details).
LinesF (Float) Interface
This interface can be used to read/modify the properties of the Lines Class where the values are
doubles. The structure of the interface is as follows:
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Lines Class where the values are
Strings. The structure of the interface is as follows:
This interface returns a string, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Lines Class where the values are
Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: Lines.AllNames
This parameter gets the name of all Line Objects.
Parameter 1: Lines.RMatrix read
This parameter gets the resistance matrix (full), ohms per unit length. Variant array of doubles.
Parameter 2: Lines.RMatrix write
This parameter sets the resistance matrix (full), ohms per unit length. Variant array of doubles.
Parameter 3: Lines.XMatrix read
This parameter gets the reactance matrix (full), ohms per unit length. Variant array of doubles.
Parameter 4: Lines.XMatrix write
This parameter sets the reactance matrix (full), ohms per unit length. Variant array of doubles.
Parameter 5: Lines.CMatrix read
This parameter gets the capacitance matrix (full), nanofarads per unit length. Variant array of
doubles.
Parameter 6: Lines.CMatrix write
This parameter sets the capacitance matrix (full), nanofarads per unit length. Variant array of
doubles.
Parameter 7: Lines.YPrim read
This parameter gets the YPrimitive of the active Line.
Parameter 8: Lines.YPrim write
This parameter does nothing at present.
LineCodes Interface
This interface implements the Lines (ILineCodes) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the LineCode Class where the values are
integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: LineCodes.Count
This parameter gets the number of Line Objects in Active Circuit.
Parameter 1: LineCodes.First
This parameter sets the first element active. Returns 0 if no lines. Otherwise, index of the line
element.
Parameter 2: LineCodes.Next
This parameter sets the next element active. Returns 0 if no lines. Otherwise, index of the line
element.
Parameter 3: LineCodes.Units Read
This parameter delivers the units of the active LineCode as an integer.
Parameter 4: LineCodes.Units Write
This parameter sets the units of the active LineCode. The units must be specified as an integer in
the argument. Please refer to the OpenDSS User manual for more information.
Parameter 5: LineCodes.Phasess Read
This parameter delivers the number of phases of the active LineCode as an integer.
Parameter 6: LineCodes.Phasess Write
This parameter sets the number of phases of the active LineCode. The units must be specified as
an integer in the argument.
Parameter 7: Lines. IsZ1Z0
This parameter gets the flag (Boolean 1/0) denoting whether the impedance data were entered in
symmetrical components.
This interface can be used to read/modify the properties of the LineCode Class where the values are
doubles. The structure of the interface is as follows:
This interface returns a floating point number, the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
This interface can be used to read/modify the properties of the LineCode Class where the values are
Strings. The structure of the interface is as follows:
This interface returns a string, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the LineCode Class where the values are
Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Loads Interface
This interface implements the Loads (ILoads) interface of OpenDSS by declaring 4 procedures for
accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the Loads Class where the values are
integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: Loads.First
This parameter allows to set the active load into the first load registered in the active circuit. As a
result, this property will return the number 1. The parameter argument can be filled with a 0.
Parameter 1: Loads.Next
This parameter sets the active load into the next load registered in the active circuit. As a result,
this property will deliver the index of the active load. The parameter argument can be filled with a
0.
Parameter 2: Loads.Idx – Read
This parameter allows to read the index of the active load. The parameter argument can be filled
with a 0.
Parameter 3: Load.Idx – Write
This parameter allows to write the index of the active load. The parameter argument must contain
the index of the desired active load. The return value will be equal to 0.
Parameter 4: Load.Count
This parameter returns the number of load elements within the active circuit. The parameter
argument can be filled with a 0.
This interface can be used to read/modify the properties of the Loads Class where the values are
floating point numbers (double). The structure of the interface is as follows:
This interface returns a Double (IEEE 754 64 bits), the variable “parameter” (Integer) is used to
specify the property of the class to be used and the variable “argument” (double) can be used to
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Loads Class where the values are
strings. The structure of the interface is as follows:
This interface returns a string, the variable “parameter” (Integer) is used to specify the property of
the class to be used and the variable “argument” (string) can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
This interface can be used to read/modify the properties of the Loads Class where the values are
variants (the value can have different formats). The structure of the interface is as follows:
This interface returns a string, the variable “parameter” (Integer) is used to specify the property of
the class to be used and the variable “argument” (Variant) is used to return the variant structure.
Parameter 0: Loads.AllNames
This parameter allows to read the names of all the loads present in the active circuit. The result is
delivered as variant, however, the content of this variant is an array of strings.
Parameter 1: Loads.ZIPV - Read
This parameter allows to read the array of 7 elements (doubles) for ZIP property of the active Load
object.
Parameter 2: Loads.ZIPV - Write
This parameter allows to write the array of 7 elements (doubles) for ZIP property of the active Load
object.
LoadShapes Interface
This interface implements the LoadShape (ILoadShape) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: LoadShapes.Count
This parameter returns the number of LoadShape objects currently defined in LoadShape collection.
Parameter 1: LoadShapes.First
This parameter sets the first loadshape active and return integer index of the loadshape. Returns 0
if no more.
Parameter 2: LoadShapes.Next
This parameter sets the next loadshape active and return integer index of the loadshape. Returns 0
if no more.
Parameter 3: LoadShapes.Npts read
This parameter gets the number of points in active LoadShape.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface returns string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: LoadShapes.AllNames
This parameter gets a variant array of strings containing names of all LoadShape objects currently
defined.
Parameter 1: LoadShapes.PMult read
This parameter gets a variant array of doubles for the P multiplier in the LoadShape.
Parameter 2: LoadShapes.PMult write
This parameter sets a variant array of doubles for the P multiplier in the LoadShape.
Parameter 3: LoadShapes.QMult read
This parameter gets a variant array of doubles for the Q multiplier in the LoadShape.
Parameter 4: LoadShapes.QMult write
This parameter sets a variant array of doubles for the Q multiplier in the LoadShape.
Parameter 5: LoadShapes.TimeArray read
This parameter gets a time array in hours corresponding to P and Q multipliers when the Interval =
0.
Parameter 6: LoadShapes.TimeArray write
This parameter sets a time array in hours corresponding to P and Q multipliers when the Interval =
0.
Meters Interface
This interface implements the Meters (IMeters) interface of OpenDSS by declaring 4 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Meters.First
This parameter sets the first Energy Meter active. Returns 0 if no monitors.
Parameter 1: Meters.Next
This parameter sets the next energy Meter Active. Returns 0 if no more.
Parameter 2: Meters.Reset
This parameter resets the active Meter object.
Parameter 3: Meters.ResetAll
This parameter resets all Meter object.
Parameter 4: Meters.Sample
This parameter causes active meter to take a sample.
Parameter 5: Meters.Save
This parameter causes active meter to save its current sample buffer to its meter stream. Then you
can access the Bytestream or channel data. Most standard solution modes do this automatically.
Parameter 6: Meters.MeteredTerminal read
This parameter returns the number of metered terminal by the active Energy Meter.
Parameter 7: Meters.MeterdTerminal Write
This parameter sets the number of metered terminal by the active Energy Meter.
Parameter 8: Meters.DIFilesAreopen
This parameter returns a global flag (1=true, 0=false) to indicate if Demand Interval (DI) files have
been properly opened.
Parameter 9: Meters.SampleAll
This parameter causes all Energy Meters to take a sample of the present state. Returns 0.
Parameter 10: Meters.SaveAll
This parameter save all Energy Meter buffers to their respective file streams. Returns 0.
Parameter 11: Meters.OpenAllDIFiles
This parameter opens Demand Interval (DI) files. Returns 0.
Parameter 12: Meters.CloseAllDIFiles
This parameter closes all Demand Interval (DI) files. Necessary at the end of a run.
Parameter 13: Meters.CountEndElements
This parameter returns the number of zone end elements in the active meter zone.
Parameter 14: Meters.Count
This parameter returns the number of Energy Meters in the Active Circuit.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number (64 bits) according to the number sent in the variable
“parameter”. The parameter can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string according to the number sent in the variable “parameter”. The
parameter can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a variant according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Monitors Interface
This interface implements the Monitors (IMonitors) interface of OpenDSS by declaring 3 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer according to the number sent in the variable “parameter”. The
parameter can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Monitors.FileName
This parameter returns the name of the CSV file associated with active monitor.
Parameter 1: Monitors.Name read
This parameter returns the active Monitor object by name.
Parameter 2: Monitors.Name Write
This parameter sets the active Monitor object by name.
Parameter 3: Monitors.Element read
This parameter returns the full name of element being monitored by the active Monitor.
Parameter 4: Monitors.Element Write
This parameter sets the full name of element being monitored by the active Monitor.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a variant according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Monitors.AllNames
This parameter returns an array of all Monitor names (array of strings).
Parameter 1: Monitors.ByteStream
This parameter returns a byte array containing monitor stream values. Make sure a "save" is done
first (standard solution modes do this automatically).
Parameter 2: Monitors.Header
This parameter returns the header string; Variant array of strings containing Channel Names.
Parameter 3: Monitors.dblHour
This parameter returns a variant array of doubles containing time value in hours for the time-
sampled monitor values; empty if frequency-sampled values for harmonics solution (see dblFreq).
Parameter 4: Monitors.dblFreq
This parameter returns a variant array of doubles containing time values for harmonics mode
solutions; empty for time mode solutions (use dblHour).
Parallel Interface
These interfaces allows users to use the parallel processing features included in OpenDSS-PM. With
this interface it is possible to create multiple actors, specify the CPU where the actor will be
executed, control the execution of the actors, check the actors status and progress among many
other functionalities.
This interface allows to control parameters of the parallel computing suite of OpenDSS-PM where
its value can be specified as an integer number. The structure of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: Parallel.NumCPUs
This parameter returns the number of CPUs available in the local computer.
Parameter 1: Parallel.NumCores
This parameter returns the number of physical cores available in the local computer. If your
computer has less than 64 Cores, this number should be the number of CPUs/2. For more
information, please check: https://www.howtogeek.com/194756/cpu-basics-multiple-cpus-cores-
and-hyper-threading-explained/.
Parameter 2: Parallel.ActiveActor read
This parameter returns the ID of the active actor.
Parameter 3: Parallel.ActiveActor write
This parameter sets the ID of the active actor; this number cannot be higher than the number of
existing actors.
Parameter 4: Parallel.CreateActor
This parameter creates a new actor and sets the active actor ID as the ID for the recently created
actor. If there are no more CPUs available, the system will not allow the creation of the new actor
Parameter 5: Parallel.ActorCPU read
This parameter gets the ID of the CPU assigned for the execution of the active actor.
Parameter 6: Parallel.ActorCPU write
This parameter sets the CPU for the execution of the active actor.
Parameter 7: Parallel.NumActors
This parameter gets the number of actors created in the actual session.
Parameter 8: Parallel.Wait
This parameter waits until all the actors are free and ready to receive a new command.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Parallel.ActorProgress
This parameter returns an array of integers containing the progress in percentage for each active
actor.
Parameter 1: Parallel.ActorStatus
This parameter returns an array of integers containing the status of each active actor. If 1, the actor
is ready to receive new commands, if 0, the actor is busy performing a simulation and cannot take
new “solve” commands at this time. However, the actor is capable to deliver values while the
simulation is being performed.
Parser Interface
This interface implements the CmathLib (ICmathLib) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: Parser.IntValue
This parameter return next parameter as a long integer.
Parameter 1: Parser.ResetDelimeters
This parameter reset delimiters to their default values.
Parameter 2: Parser.AutoIncrement read
In this parameter the default is false (0). If true (1) parser automatically advances to next token after
DblValue, IntValue, or StrValue. Simpler when you don't need to check for parameter names.
Parameter 3: Parser.AutoIncrement read
In this parameter the default is false (0). If true (1) parser automatically advances to next token after
DblValue, IntValue, or StrValue. Simpler when you don't need to check for parameter names.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
Parameter 0: Parser.DblValue
This parameter returns next parameter as a double.
ParserS (String) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Parser.Vector
This parameter returns token as variant array of doubles. For parsing quoted array syntax.
PDElements Interface
This interface implements the PDElements (IPDElements) interface of OpenDSS by declaring 3
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: PDElements.Count
This parameter gets number of PDElements in active circuit.
Parameter 1: PDElements.First
This parameter sets the first enabled PD element to be the active element. Returns 0 if none found.
Parameter 2: PDElements.Next
This parameter sets the next enabled PD element to be the active element. Returns 0 if none found.
Parameter 3: PDElements.IsShunt
This parameter returns 1 if the PD element should be treated as a shunt element rather than a series
element. Applies to capacitor and reactor elements in particular.
Parameter 4: PDElements.NumCustomers
This parameter gets the number of customers in this branch.
Parameter 5: PDElements.TotalCustomers
This parameter gets the total number of customers from this branch to the end of the zone.
Parameter 6: PDElements.ParentPDElement
This parameter gets the parent PD element to be the active circuit element. Returns 0 if no more
elements upline.
Parameter 7: PDElements.FromTerminal
This parameter gets the number of the terminal of active PD element that is on the "from" side. This
is set after the meter zone is determined.
Parameter 8: PDElements.SectionID
This parameter gets the integer ID of the feeder section that this PDElement branch is part of.
PDElementsF (Float) Interface
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
PVsystems Interface
This interface implements the PVSystems (IPVSystems) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: PVSystems.Count
This parameter returns the number of PVSystem objects currently defined in the active circuit.
Parameter 1: PVSystems.First
This parameter sets the first PVSystem to be active; returns 0 if none.
Parameter 2: PVSystems.Next
This parameter sets the next PVSystem to be active; returns 0 if none.
Parameter 3: PVSystems.Idx read
This parameter gets the active PVSystem by index; 1..Count.
Parameter 4: PVSystems.Idx write
This parameter sets the active PVSystem by index; 1..Count.
PVSystemsF (Float) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: PVSystems.AllNames
This parameter gets the variant array of string containing names of all PVSystems in the circuit.
Reclosers Interface
This interface implements the Reclosers (IReclosers) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Reclosers.Count
This parameter gets number of Reclosers in active circuit.
Parameter 1: Reclosers.First
This parameter sets first recloser to be active Circuit Element. Returns 0 if none.
Parameter 2: Reclosers.Next
This parameter sets next recloser to be active Circuit Element. Returns 0 if none.
Parameter 3: Reclosers.MonitoredTerm read
This parameter gets the terminal number of Monitored Object for the Recloser.
Parameter 4: Reclosers.MonitoredTerm write
This parameter sets the terminal number of Monitored Object for the Recloser.
Parameter 5: Reclosers.SwitchedTerm read
This parameter gets the terminal of the controlled device being switched by the Recloser.
Parameter 6: Reclosers.SwitchedTerm write
This parameter sets the terminal of the controlled device being switched by the Recloser.
Parameter 7: Reclosers.NumFast read
This parameter gets the number of fast shots.
Parameter 8: Reclosers.NumFast write
This parameter sets the number of fast shots.
Parameter 9: Reclosers.Shots read
This parameter gets the number of shots to lockout (fast + delayed).
Parameter 10: Reclosers.Shots write
This parameter sets the number of shots to lockout (fast + delayed).
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Reclosers.AllNames
This parameter gets a variant array of strings with names of all reclosers in active circuit.
Parameter 1: Reclosers.RecloseIntervals
This parameter gets a variant array of doubles: reclose intervals (s) between shots.
RegControls Interface
This interface implements the RegControls (IRegControls) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: RegControls.AllNames
This parameter gets a variant array of strings containing all RegControl names.
Relays Interface
This interface implements the Relays (IRelays) interface of OpenDSS by declaring 3 procedures for
accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Relays.Count
This parameter gets number of Relays in active circuit.
Parameter 1: Relays.First
This parameter sets first relay active. If none, returns 0.
Parameter 2: Relays.Next
This parameter sets next relay active. If none, returns 0.
Parameter 3: Relays.MonitoredTerm read
This parameter gets the number of terminal of monitored element that this relay is monitoring.
Parameter 4: Relays.MonitoredTerm write
This parameter sets the number of terminal of monitored element that this relay is monitoring.
Parameter 5: Relays.SwitchedTerm read
This parameter gets the number of terminal of the switched object that will be opened when the
relay trips.
Parameter 6: Relays.SwitchedTerm write
This parameter sets the number of terminal of the switched object that will be opened when the
relay trips.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Relays.AllNames
This parameter gets a variant array of strings containing names of all relay elements.
Sensors Interface
This interface implements the Sensors (ISensors) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Sensors.Count
This parameter gets number of sensors in active circuit.
Parameter 1: Sensors.First
This parameter sets the first sensor active. Returns 0 if none.
Parameter 2: Sensors.Next
This parameter sets the next sensor active. Returns 0 if none
Parameter 3: Sensors.IsDelta read
This parameter returns 1 if the sensor is connected in delta; otherwise, returns 0.
Parameter 4: Sensors.IsDelta write
This parameter allows to set 1 if the sensor is connected in delta; otherwise, set 0 (argument).
Parameter 5: Sensors.ReverseDelta read
This parameter returns 1 if voltage measurements are 1-3, 3-2, 2-1; otherwise 0.
Parameter 6: Sensors.ReverseDelta write
This parameter allows to set 1 if voltage measurements are 1-3, 3-2, 2-1; otherwise 0.
Parameter 7: Sensors.MeteredTerminal read
This parameter gets the number of the measured terminal in the measured element.
Parameter 8: Sensors.MeteredTerminal write
This parameter sets the number of the measured terminal in the measured element.
Parameter 9: Sensors.Reset
This parameter clears the active sensor.
Parameter 10: Sensors.ResetAll
This parameter clears all sensors in the active circuit.
SensorsF (Float) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Settings Interface
This interface implements the Settings (ISettings) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
Parameter 0: Settings.AllocationFactors
This parameter sets all load allocation factors for all loads defined by XFKVA property to this value.
Parameter 1: Settings.NormVminpu read
This parameter gets the per unit minimum voltage for Normal conditions.
Parameter 2: Settings.NormVminpu write
This parameter sets the per unit minimum voltage for Normal conditions.
Parameter 3: Settings.NormVmaxpu read
This parameter gets the per unit maximum voltage for Normal conditions.
Parameter 4: Settings.NormVmaxpu write
This parameter sets the per unit maximum voltage for Normal conditions.
Parameter 5: Settings.EmergVminpu read
This parameter gets the per unit minimum voltage for Emergency conditions.
Parameter 6: Settings.EmergVminpu write
This parameter set the per unit minimum voltage for Emergency conditions.
Parameter 7: Settings.EmergVmaxpu read
This parameter gets the per unit maximum voltage for Emergency conditions.
Parameter 8: Settings.EmergVmaxpu write
This parameter sets the per unit maximum voltage for Emergency conditions.
Parameter 9: Settings.UEWeight read
This parameter gets the weighting factor applied to UE register values.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Solution Interface
This interface implements the Solution (ISolution) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: Solution.Solve
Executes the solution for the present solution mode. Returns 0.
Parameter 1: Solution.Mode - Read
This parameter returns the present solution mode (See DSS help).
Parameter 2: Solution.Mode - Write
This parameter modifies the present solution mode (See DSS help).
Parameter 3: Solution.hour - Read
This parameter returns the present hour (See DSS help).
Parameter 4: Solution.hour - Write
This parameter modifies the present hour (See DSS help).
Parameter 5: Solution.Year - Read
This parameter returns the present Year (See DSS help).
Parameter 6: Solution.Year - Write
This parameter modifies the present Year (See DSS help).
Parameter 7: Solution.Iterations
This parameter returns the number of iterations taken for the last solution.
Parameter 8: Solution.MaxIterations - Read
This parameter returns the Maximum number of iterations used to solve the circuit.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number according to the number sent in the variable
“parameter”. The parameter can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Solution.ModeID
This parameter returns the ID (text) of the present solution mode.
Parameter 1: Solution.LDCurve read
This parameter returns the Load-Duration Curve name for LD modes.
Parameter 2: Solution.LDCurve write
This parameter sets the Load-Duration Curve name for LD modes.
Parameter 3: Solution.DefaultDaily read
This parameter returns the default daily load shape (defaults to "Default").
Parameter 4: Solution.DefaultDaily write
This parameter sets the default daily load shape (defaults to "Default").
Parameter 5: Solution.DefaultYearly read
This parameter returns the default yearly load shape (defaults to "Default").
Parameter 6: Solution.DefaultYearly write
This parameter sets the default yearly load shape (defaults to "Default").
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a variant according to the number sent in the variable “parameter”. The
parameter can be one of the following:
Parameter 0: Solution.EventLog
This parameter returns an array of strings containing the Event Log.
SwtControls Interface
This interface implements the SwtControls (ISwtControls) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: SwtControls.First
This parameter sets the first SwtControl active. Returns 0 if no more.
Parameter 1: SwtControls.Next
This parameter sets the next SwtControl active. Returns 0 if no more.
Parameter 2: SwtControls.Action read
This parameter gets the open (1) or close (2) action of the switch. No effect if switch is locked.
However, reset removes any lock and then closes the switch (shelf state). 0 = none action.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number (64 bits) with the result of the query according to the
value of the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Text Interface
This interface can be used to send commands to the text interface of OpenDSS (DSS.Text). The
structure of the interface is as follows:
This interface returns a string pointer (ANSI) with the result of the command sent, the variable
“Command” is used as input to send an OpenDSS command to the Text interface of OpenDSS.
Topology Interface
This interface implements the Topology (ITopology) interface of OpenDSS by declaring 3 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Topology.NumLoops
This parameter gets the number of loops.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: Topology.AllLoopedPairs
This parameter gets a variant array of all looped element names, by pairs.
Parameter 1: Topology.AllIsolatedBranches
This parameter gets a variant array of all isolated branch names.
Parameter 2: Topology.AllIsolatedLoads
This parameter gets a variant array of all isolated load names.
Transformers Interface
This interface implements the Transformers (ITransformer) interface of OpenDSS by declaring 4
procedures for accessing the different properties included in this interface.
This interface can be used to read/modify the properties of the Transformers Class where the values
are integers. The structure of the interface is as follows:
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the
property of the class to be used and the variable “argument” can be used to modify the value of the
property when necessary. Reading and writing properties are separated and require a different
parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Transformers Class where the values
are doubles. The structure of the interface is as follows:
This interface returns a floating point number (64 bits), the variable “parameter” is used to specify
the property of the class to be used and the variable “argument” can be used to modify the value
of the property when necessary. Reading and writing properties are separated and require a
different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface returns a string, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
This interface can be used to read/modify the properties of the Transformers Class where the values
are Variants. The structure of the interface is as follows:
This interface returns a Variant, the variable “parameter” is used to specify the property of the class
to be used and the variable “argument” can be used to modify the value of the property when
necessary. Reading and writing properties are separated and require a different parameter number
to be executed.
The properties (parameter) are integer numbers and are described as follows:
Parameter 0: Transformers.AllNames
This parameter gets a variant array of strings with all Transformer names in the active circuit.
Parameter 1: Transformers.WdgVoltages
This parameter gets a variant array of doubles containing the voltages at the active winding on the
active transformer. These voltages come as complex pairs.
Parameter 2: Transformers.WdgCurrents
This parameter gets a variant array of doubles containing the currents at the active winding on the
active transformer. These currents come as complex pairs.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns an integer number with the result of the query according to the value of the
variable Parameter, which can be one of the following:
Parameter 0: VSources.Count
This parameter returns the number of VSource objects currently defined in the active circuit.
Parameter 1: VSources.First
This parameter sets the first VSource to be active; returns 0 if none.
Parameter 2: VSources.Next
This parameter sets the next VSource to be active; returns 0 if none.
Parameter 3: VSources.Phases read
This parameter gets the number of phases of the active VSource.
Parameter 4: VSources.Phases write
This parameter sets the number of phases of the active VSource.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following:
Parameter 0: VSources.AllNames
This parameter gets the name of the active VSource.
XYCurves Interface
This interface implements the XYCurves (IXYCurves) interface of OpenDSS by declaring 4 procedures
for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
Parameter 0: XYCurves.Count
This parameter gets number of XYCurves in active circuit.
Parameter 1: XYCurves.First
This parameter sets first XYCurves object active; returns 0 if none.
Parameter 2: XYCurves.Next
This parameter sets next XYCurves object active; returns 0 if none.
Parameter 3: XYCurves.Npts read
This parameter gets the number of points in X-Y curve.
Parameter 4: XYCurves.Npts read
This parameter sets the number of points in X-Y curve.
XYCurvesF (Float) Interface
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a floating point number with the result of the query according to the value of
the variable Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a string with the result of the query according to the value of the variable
Parameter, which can be one of the following:
This interface can be used to read/write certain properties of the active DSS object. The structure
of the interface is as follows:
This interface returns a Variant with the result of the query according to the value of the variable
Parameter, which can be one of the following: