dotTC57 Open-Source Library
dotTC57 is my MIT-licensed open-source .NET implementation of the IEC Technical Committee 57 (TC57) Common Information Model (IEC 61970 and IEC 61968). It gives developers both a strongly typed C# object model generated from the official CIM UML and a .NET 10 reflection-based OWL 2 / RDF ontology generator.
- GitHub Repository: github.com/s-o-w/dotTC57
- NuGet Package: nuget.org/packages/dotTC57
- Live Generated Ontologies: Browse in the CIM100 Explorer · Download
.ttl/.owl/.jsonld
Origin and Motivation
Section titled “Origin and Motivation”The first prototype behind dotTC57 was written in a hotel room during a 2023 SDSIC consortium meeting: a script that parsed an XML/RDF CIM substation bay sample and rendered an SVG single-line diagram from it. In June 2024, an open call to the CIM User Group confirmed that no open-source .NET CIM object library with RDF serialization existed. In July 2025, I published dotTC57 under the MIT license on GitHub and NuGet, and expanded it in 2026 with the .NET 10 OWL 2 ontology generator.
Building dotTC57 solved two recurring problems with existing CIM tooling:
- Eliminating manual RDF/XML wrangling in .NET. Native CIM RDF/XML is verbose and error-prone in application code. Strongly typed C# classes provide compile-time checking, IntelliSense, and clean integration with LINQ and Entity Framework Core.
- Replacing static hunt-and-peck profiles with full UML coverage. Traditional CIMTool workflows require hand-picking classes and fields into a narrow derived profile up front. Substation and distribution design needs dynamic access to the full IEC 61970 and IEC 61968 model (
1,414top-level types across77packages), using CIM natively and layering minimal extensions on top.
Strongly Typed C# Usage
Section titled “Strongly Typed C# Usage”using TC57CIM.IEC61970.Base.Core;using TC57CIM.IEC61970.Base.Wires;
var substation = new Substation{ mRID = Guid.NewGuid(), name = "Main Street Substation",};
var breaker = new Breaker{ mRID = Guid.NewGuid(), name = "CB-101",};.NET 10 OWL 2 & JSON Metadata Generator
Section titled “.NET 10 OWL 2 & JSON Metadata Generator”dotTC57.OwlGenerator reflects directly over the compiled dotTC57 assembly and its generated XML documentation (dotTC57.xml) to emit deterministic, W3C-compliant ontologies:
iec61970.{ttl,owl,jsonld}(807types:725classes/datatypes,82enums;35,799triples)iec61968.{ttl,owl,jsonld}(607types:435classes,172enums;25,540triples;owl:imports iec61970.ttl)cim100.{ttl,owl,jsonld}(umbrella ontology importing both standards)cim-model.json(structured metadata index powering the CIM100 Explorer on this site)
# Generate Turtle (.ttl), UTF-8 RDF/XML (.owl), JSON-LD 1.1 (.jsonld), and cim-model.jsondotnet run --project dotTC57.OwlGenerator -c Release -- generate --out ./out
# Verify all generated or hosted ontology files offlinedotnet run --project dotTC57.OwlGenerator -c Release -- verify --dir ./out
# Convert an external Turtle ontology to .owl and .jsonlddotnet run --project dotTC57.OwlGenerator -c Release -- convert --in ./my-extension.ttl --out-prefix ./out/my-extension
# Run the automated xUnit OWL verification suitedotnet test dotTC57.sln -c ReleaseEvery emitted term preserves canonical http://iec.ch/TC57/CIM100# IRIs, OWL 2 DL anonymous owl:oneOf enum definitions, explicit cimdoc: package and Normative/Informative tier annotations, and open-world object properties so SHACL profiles can govern cardinality cleanly by use case.