Skip to content

Import: DSS → CIM

The importer reads an OpenDSS model from disk, parses it with OpenDSSDirect.py, and builds a cimgraph FeederModel populated with cimhub_2026 objects.

Basic Usage

from cimhub_opendss.importer.dss_to_cim import dss_to_cim

feeder = dss_to_cim("/path/to/Master.dss")

feeder is a cimgraph.models.FeederModel. You can traverse it like any other CIM graph:

import cimgraph.data_profile.cimhub_2026 as cim

for load in feeder.graph[cim.EnergyConsumer].values():
    print(load.name, load.p.to('kW'), load.q.to('kVAr'))

What Gets Imported

Each DSS element type is handled by a dedicated converter module under cimhub_opendss/importer/:

DSS Type CIM Class Module
Line ACLineSegment importer/lines/line.py
LineCode PerLengthSequenceImpedance importer/lines/linecode.py
Load EnergyConsumer importer/loads/load.py
Transformer PowerTransformer / TransformerTank importer/transformers/
Capacitor LinearShuntCompensator importer/capacitors/capacitor.py
CapControl RegulatingControl importer/capacitors/capcontrol.py
RegControl TapChanger importer/regulators/regcontrol.py
PVSystem PhotoVoltaicUnit importer/pvsystems/pvsystem.py
Storage BatteryUnit importer/storage/storage.py
Generator SynchronousMachine importer/generators/generator.py
Vsource EnergySource importer/vsources/vsource.py
Switch / Breaker / Fuse / Recloser Switch subclasses importer/switches/switch.py
WireData WireInfo importer/conductors/wiredata.py
CNData ConcentricNeutralCableInfo importer/conductors/cndata.py
TSData TapeShieldCableInfo importer/conductors/tsdata.py
LineGeometry WireSpacingInfo importer/conductors/linegeometry.py
LineSpacing WireSpacingInfo importer/conductors/linespacing.py

Known Gaps

See Model Coverage for the full attribute-level coverage table and open TODOs.