dss.ISwtControls#

Module Contents#

Classes#

ISwtControls

API#

class dss.ISwtControls.ISwtControls(api_util)#

Bases: dss._cffi_api_util.Iterable

property Action: int#

Open or Close the switch. No effect if switch is locked. However, Reset removes any lock and then closes the switch (shelf state).

Original COM help: https://opendss.epri.com/Action1.html

property AllNames: List[str]#

Array of all names of this object type

property Count: int#

Number of objects of this type

property Delay: float#

Time delay [s] between arming and opening or closing the switch. Control may reset before actually operating the switch.

Original COM help: https://opendss.epri.com/Delay3.html

property First: int#

Sets the first object of this type active. Returns 0 if none.

property IsLocked: bool#

The lock prevents both manual and automatic switch operation.

Original COM help: https://opendss.epri.com/IsLocked.html

property Name: str#

Gets the current name or sets the active object of this type by name

property Next: int#

Sets next object of this type active. Returns 0 if no more.

property NormalState: dss.enums.ActionCodes#

Get/set Normal state of switch (see ActionCodes) dssActionOpen or dssActionClose

Reset()#
property State: int#

Set it to force the switch to a specified state, otherwise read its present state.

Original COM help: https://opendss.epri.com/State.html

property SwitchedObj: str#

Full name of the switched element.

Original COM help: https://opendss.epri.com/SwitchedObj3.html

property SwitchedTerm: int#

Terminal number where the switch is located on the SwitchedObj

Original COM help: https://opendss.epri.com/SwitchedTerm3.html

__init__(api_util)#
__iter__() Iterator[dss._cffi_api_util.Iterable]#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__() int#
property idx: int#

Gets the current index or sets the active object of this type by index

While the official API included this for some classes, this is an API Extension for:

  • Capacitors

  • CapControls

  • ISources

  • LineCodes

  • Lines

  • LoadShapes

  • Meters

  • Monitors

  • RegControls

  • Sensors

  • SwtControls

  • Transformers

  • Vsources

  • XYCurves

(API Extension)