cimoxide for VS Code
Language support for ENTSO-E CGMES and Network Code (NC) RDF/XML, powered by
cimoxide.
Validation — the CGMES and NC SHACL rules (shape tables plus the hand-written
sh:sparql rules) as diagnostics, the same findings as cimox validate. A model is
usually several files (EQ, SSH, SV, TP, …), so the unit of validation is a model set:
every CIM XML file in the document's directory. Cross-profile findings appear on every
file that writes the object.
Choosing a model set — Choose model set files… (in the CIM Model view's title, or
the command palette), or Use as CIM model set on files selected in the Explorer, makes
those files one model set, from any folders: an IGM with its boundary kept elsewhere, say,
or some of a folder's files. They leave their folders' sets; the rest of each folder stays
a set of its own. The status bar shows the set chosen; from there it can be changed, added
to, or given up for folders again. The workspace remembers it, and chat reads it too.

Hover — a class's definition from the ENTSO-E vocabulary, inheritance chain and
profiles, an attribute's definition, type, multiplicity and profiles, an enumeration
value's definition, and the class and name of the object an rdf:resource points to.

Go to definition / find references — follow rdf:resource="#_…" across the files
of the model set.
Outline — every object in the document, labelled by IdentifiedObject.name, with its
class and containers (Breaker · PP_Brussels › 110.0 › Bay 3).
CIM Model (in the Explorer) — the active document's model set as a tree: Geographical,
regions down through substations, voltage levels, bays and equipment to terminals, limits and
state variables; Operational, control and load areas; Not contained, what no container
holds (base voltages, curves, …), by class; By class, every object. A region whose file is
missing (an IGM without its boundary set) is listed by its mRID. Each node shows the number of
findings below it, in the colour of the worst; the filter button keeps only those with findings.
The search button finds any object of the set by name or mRID as you type, not only what the
tree has loaded, and reveals it. Click to open where an object is written; Show in grid selects
it in the grid view, inside its substation where it has one; Referenced by… lists what refers to
it. The view is where the model is edited — Fix…, Rename mRID…, Delete, Add… — in files
of any size. Reveal in CIM Model (editor context menu) selects the object at the
cursor; cimoxide.model.followCursor does so as the cursor moves.

Rename and delete — Rename Symbol (F2) on an rdf:ID, rdf:about or rdf:resource, or
Rename mRID… in the CIM Model view, renames the mRID in every file of the model set:
definitions, descriptions, references and an IdentifiedObject.mRID that writes it; the files it
changes open for review. Delete in the view removes an object from every file with the
references to it, or with everything it holds (a voltage level's bays, equipment, terminals, …):
once confirmed, it is made and saved in every file at once, so no file is left half-deleted. Both
change the files as written and nothing else.
Add an object — Add… on an object in the CIM Model view: pick a class among those it can hold (equipment, bays and connectivity nodes in a voltage
level; terminals, ends, limit sets on equipment, …) and a name. The object is written with a new
UUID, its mRID, name and container, in the file whose profile carries it, after what the
container already holds, with an empty element for its SSH part; its name is selected. What else
it needs shows as findings, which the quick fixes below complete.
Quick fixes — on a finding that a field is missing (Quick Fix…, Ctrl+., or Fix… in the
CIM Model view): add it, to the
file whose profile carries it (an SSH attribute to the SSH file, wherever the finding shows), with
a value to type over, which is selected: false, 0, an enumeration's first value or the object's
own mRID. A missing reference is offered with the five likeliest objects to name (Add
Terminal.ConnectivityNode: ConnectivityNode BUS_1 in PP_Brussels › 110.0), or empty with the
objects listed to choose from; a reference to nothing (rdf:resource="#"), which no finding
reports, or to an object the set lacks, is offered the same. With several missing on one object,
one fix adds them all.

Completion in an rdf:resource value: the objects of the set the reference can name, the
likeliest first (linked to the object through its other references, then nearest in its
containers), or an enumeration's values.
Completion — after <: the attributes of the enclosing object's class (inherited ones
included), or the classes of the document's namespace between objects.
Grid view — cimoxide: Show grid (or the button in the editor title) draws the model
set as substations, boundary points and the lines between them: as the set's Diagram Layout
draws them, on its Geographical Locations, or laid out automatically as a schematic, every line
horizontal, vertical or at 45°, routed round other substations, with lines that share a stretch
(double circuits among them) drawn side by side. Substations are boxes in their highest voltage's
colour; lines are wider the higher their voltage (legend in the side panel). Labels that would
crowd a more important one are hidden until you zoom in; hover anything for its name and values.
Select one for its voltage levels, equipment and findings; double-click a line to open where it
is written. Drag to pan, or pan with the middle or right button over anything. Findings are the
CIM Model view's to show, not the drawing's.
Inside a substation — double-click a substation to see its single-line diagram: equipment in
single-line symbols (after IEC 60617, as the CIM Model view's icons are), busbars, bays and
connectivity nodes by voltage level, switches drawn open or closed, out-of-service equipment
faded; as its Diagram Layout draws it, or laid out automatically. Names appear by importance as
you zoom in: busbars, lines and transformers first, switches and nodes close up. Double-click a
line to go to its other end, Escape to go back. The view follows each revalidation.
State — where the set has an SV file, Colour by switches between voltage levels (the
default) and the SV's state: voltages within 5 % of nominal and lines loaded below 80 % of their
PATL in green, then amber, then red. Values shows the voltages, loadings and flows beside what
they describe: only those needing attention (the default), all, or none; arrows show which way
active power flows.
Edit a substation — Edit inside a substation: drag items to move them (the routes follow)
and Save as diagram to keep the layout as a DL diagram, into a new DL file if the set has
none. Double-click a switch to open or close it; select equipment and press Delete to remove it
with its terminals, limits and diagram objects; drop a node onto another or onto a busbar to
join them (where it would land is highlighted); Disconnect a selected wire. Add from the
palette by dragging, or clicking and then clicking where it goes: equipment into a voltage
level, a switch into a wire, a bay (single or double feeder, transformer bay, coupler) onto a
busbar. What is added opens where it is written, with what it still needs as findings. Edits
are left unsaved and undoable, as VS Code's refactorings are.


Chat — an MCP server, cimmcp, offered to chat (Copilot agent mode): ask about the
model sets of the workspace. Its tools list the model sets, summarise one (headers, object
counts), find objects by class, name or attribute value, show an object with its references
resolved, validate, run SPARQL and describe a CIM class. They only read. Asked about no
set in particular, they read the model set chosen, if any. Turn it off with
cimoxide.mcp.enabled.
Files over 50 MB (a large EQ file): VS Code does not pass them to extensions, so their editor
has no hover, completion, quick fixes or rename; a notice says so when one opens. Their model set is
still validated, and the CIM Model view browses, fixes (Fix…), renames, deletes and adds in
them as in any other, as does the grid view's Edit: their edits are computed from the files on
disk and written straight to them, which VS Code cannot undo (the status bar says so).
CIM XML: CGMES and NC files open as their own language, CIM XML, highlighted as XML, so
extensions for XML in general (schema validation, formatting, …) leave them alone. They are .xml
like any other, so each XML file is looked at as it opens and switched if it names a CIM namespace:
it shows as XML for a moment first. Set one back to XML with Change Language Mode, or turn
cimoxide.claimFiles off; to have files open as CIM XML straight away, assign them by path with
files.associations ("**/models/**/*.xml": "cimxml").
Validation runs when a document is opened and saved, and when a file of a model set changes on
disk (another tool, a checkout, a file over 50 MB, which VS Code does not hand to extensions);
turn on cimoxide.validation.onType to also run it while typing.
Settings
| Setting |
|
cimoxide.validation.common |
common cross-profile checks (--common) |
cimoxide.validation.quality |
modelling-quality checks (--quality) |
cimoxide.validation.silence |
rule ids not to report |
cimoxide.validation.onType |
revalidate while typing |
cimoxide.schema.rdfsDir / cimoxide.schema.shaclDir |
load RDFS / SHACL at runtime instead of the built-in tables |
cimoxide.server.path |
use another cimlsp binary |
cimoxide.claimFiles |
open CGMES and NC files as CIM XML, not XML |
cimoxide.model.followCursor |
select the object at the cursor in the CIM Model view |
cimoxide.mcp.enabled |
offer the cimmcp MCP server to chat |
cimoxide.mcp.path |
use another cimmcp binary |
The language server, cimlsp, and the MCP server, cimmcp, are bundled for Linux (x64),
macOS (Apple silicon) and Windows (x64). They speak LSP and MCP over stdio, so other
editors and chat clients can use them too — e.g. claude mcp add cimoxide -- cimmcp --dir .
for Claude Code. The extension needs VS Code 1.101 or later.
| |