Click or drag to resize

DSS Class

[This is preliminary documentation and is subject to change.]

[Missing <summary> documentation for "T:dss_sharp.DSS"]

Inheritance Hierarchy

Namespace:  dss_sharp
Assembly:  dss_sharp (in dss_sharp.dll) Version: 1.0.0
Syntax
public class DSS : ContextState

The DSS type exposes the following members.

Constructors
  NameDescription
Public methodDSS
Expose DSS without a constructor parameters for backwards compatibility. This contructors always exposes the prime/default instance of OpenDSS. For creating new independent instances, use the static helper function NewContext.
Public methodDSS(APIUtil)
Initializes a new instance of the DSS class
Top
Properties
  NameDescription
Public propertyAllowChangeDir
If disabled, the engine will not change the active working directory during execution. E.g. a "compile" command will not "chdir" to the file path. If you have issues with long paths, enabling this might help in some scenarios. Defaults to True (allow changes, backwards compatible) in the 0.10.x versions of DSS C-API. This might change to False in future versions. This can also be set through the environment variable DSS_CAPI_ALLOW_CHANGE_DIR. Set it to 0 to disallow changing the active working directory. (API Extension)
Public propertyAllowDOScmd
If enabled, the `DOScmd` command is allowed. Otherwise, an error is reported if the user tries to use it. Defaults to False/0 (disabled state). Users should consider DOScmd deprecated on DSS Extensions. This can also be set through the environment variable DSS_CAPI_ALLOW_DOSCMD. Setting it to 1 enables the command. (API Extension)
Public propertyAllowEditor
Gets/sets whether running the external editor for "Show" is allowed AllowEditor controls whether the external editor is used in commands like "Show". If you set to 0 (false), the editor is not executed. Note that other side effects, such as the creation of files, are not affected. (API Extension)
Public propertyAllowForms
Gets/sets whether text output is allowed
Public propertyClasses
List of DSS intrinsic classes (names of the classes)
Public propertyCOMErrorResults
If enabled, in case of errors or empty arrays, the API returns arrays with values compatible with the official OpenDSS COM interface. For example, consider the function `Loads_Get_ZIPV`. If there is no active circuit or active load element: - In the disabled state (COMErrorResults=False), the function will return "[]", an array with 0 elements. - In the enabled state (COMErrorResults=True), the function will return "[0.0]" instead. This should be compatible with the return value of the official COM interface. Defaults to True/1 (enabled state) in the v0.12.x series. This will change to false in future series. This can also be set through the environment variable DSS_CAPI_COM_DEFAULTS. Setting it to 0 disables the legacy/COM behavior. The value can be toggled through the API at any time. (API Extension)
Public propertyDataPath
DSS Data File Path. Default path for reports, etc. from DSS
Public propertyDefaultEditor
Returns the path name for the default text editor.
Public propertyLegacyModels
If enabled, the legacy/deprecated models for PVSystem, InvControl, Storage and StorageControl are used. In the official OpenDSS version 9.0, the old models where removed. They are temporarily present here but may be removed in the near future. If they are important to you, please open an issue on GitHub or contact the authors from DSS Extensions: https://github.com/dss-extensions/ After toggling LegacyModels, run a "clear" command and the models will be loaded accordingly. Defaults to False. This can also be enabled by setting the environment variable DSS_CAPI_LEGACY_MODELS to 1. NOTE: this option will be removed in a future release. (API Extension)
Public propertyNumCircuits
Number of Circuits currently defined
Public propertyNumClasses
Number of DSS intrinsic classes
Public propertyNumUserClasses
Number of user-defined classes
Public propertyUserClasses
List of user-defined classes
Public propertyVersion
Get version string for the DSS.
Top
Methods
  NameDescription
Protected methodCheckForError (Inherited from ContextState.)
Public methodClearAll
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetContextHandle
Returns the low-level handle of the current OpenDSS/DSS-CAPI instance.
(Inherited from ContextState.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNewCircuit
Public methodStatic memberNewContext
Creates a new DSS engine context. A DSS Context encapsulates most of the global state of the original OpenDSS engine, allowing the user to create multiple instances in the same process. By creating contexts manually, the management of threads and potential issues should be handled by the user. (API Extension)
Public methodReset
Public methodSetActiveClass
Public methodShowPanel
Public methodStart
Public methodToString (Inherited from Object.)
Top
Fields
See Also