Skip to content

PSCAD projects ​

Modex opens a PSCAD .pscx project on a canvas and edits it in place: the file stays a PSCAD project, and PSCAD opens it as before. The editor comes from AgenticEMT, a separate package that installs into Modex and is versioned on its own. This is a preview, available in the VS Code extension and in Modex Desktop.

What you need ​

  • Modex for VS Code 0.1.15 or later, or Modex Desktop 0.1.2 or later.
  • AgenticEMT — installed from inside Modex, below.
  • PSCAD on the same Windows machine, for component artwork and the component palette. Without it, components appear as labelled placeholders and the palette is empty. The artwork is read from your own PSCAD install, on your machine, and is never uploaded or shared.

Install AgenticEMT ​

Open a .pscx. If AgenticEMT is missing, the tab says AgenticEMT is not installed and offers Install AgenticEMT. That downloads the latest release, verifies its SHA-256, installs it and starts it; the open tab then switches to the canvas by itself. Elsewhere:

  • VS Code — Modex: Install AgenticEMT in the Command Palette does the same.
  • Desktop — Settings → Power Systems → EMT lists AgenticEMT with Install when it is missing. Once installed, Update is in its ⋯ menu. Desktop's download does not go through an HTTP proxy; behind one, use the offline route below.

Offline, download agentic-emt-<version>.zip and SHA256SUMS from the AgenticEMT releases page, check the hash, then choose Install from ZIP… — on the tab, in the AgenticEMT ⋯ menu in Desktop's Settings → Power Systems → EMT, or as Modex: Install AgenticEMT from ZIP… in VS Code. The zip needs no unpacking.

powershell
Get-FileHash agentic-emt-<version>.zip -Algorithm SHA256   # Windows
bash
sha256sum -c SHA256SUMS                                     # Linux, macOS

Point it at PSCAD's master library ​

AgenticEMT looks for master.pslx in a PSCAD… folder directly under Program Files or Program Files (x86). If PSCAD is installed anywhere else, set Master library path on AgenticEMT's settings page: Modex: Settings… → AgenticEMT in VS Code, Settings → Power Systems → EMT in Desktop. The Set the master library path link in an empty palette opens the same page.

When a project will not open ​

The tab shows a page instead of the canvas. Its title says which case you are in. In VS Code:

The page saysWhat to do
AgenticEMT is not installedInstall AgenticEMT
AgenticEMT claims no editor for this filethe installed package is out of date — Install AgenticEMT again to update it; restarting will not help
AgenticEMT did not startRestart AgenticEMT; if it fails again, the detail line names the cause
AgenticEMT stopped unexpectedlyRestart AgenticEMT. Nothing restarts it automatically, so a repeated crash stays visible
AgenticEMT is stoppedRestart AgenticEMT
AgenticEMT is still startingwait a few seconds, then close the tab and open the file again
AgenticEMT is disabledsee Re-enable a disabled package
This window hosts no pluginsreload the VS Code window; Show AgenticEMT Log says why it failed

If a .pscx opens as raw XML instead, another extension has claimed the file type. Use Reopen Editor With… → AgenticEMT.

In Desktop the page says the same things in fewer states. Not installed, and a running package that has not published an editor for this file (an out-of-date one), offer Install AgenticEMT and Install from ZIP…; a package that stopped running offers Restart plugin. For anything else, Settings → Power Systems → EMT shows the status and its reason, with Restart and the on/off switch.

Re-enable a disabled package ​

In Desktop, switch it back on in Settings → Power Systems → EMT and press Restart beside it. VS Code has no switch for this. Open the package's state.json, change "enabled": false to true, and run Modex: Restart AgenticEMT:

PlatformFile
Windows%APPDATA%\Code\User\globalStorage\modexai.modex-vscode\plugins\agentic-emt\state.json
macOS~/Library/Application Support/Code/User/globalStorage/modexai.modex-vscode/plugins/agentic-emt/state.json
Linux~/.config/Code/User/globalStorage/modexai.modex-vscode/plugins/agentic-emt/state.json

VS Code Insiders uses Code - Insiders in place of Code.

Uninstall AgenticEMT in Desktop ​

Open Settings → Power Systems → EMT, choose ⋯ → Uninstall… on the AgenticEMT row, and confirm. Modex first saves pending edits in this window; if saving fails, resolve the reported document problem before retrying. Uninstall stops the plugin and its running tasks and removes its package files and Modex-managed settings. Your project files and separately stored cache and configuration remain. Plugin editors become unavailable until you reinstall AgenticEMT from the same page. If another Modex runtime is using this data root, close it before uninstalling.

Editing a project in both PSCAD and Modex ​

PSCAD reads a project into memory and does not lock the file. Its Save writes that in-memory copy over the file without checking for changes, so saving in PSCAD after editing in Modex discards the Modex edits — and PSCAD's own .bakx does not hold them. Edit in one program at a time, and reload the project in PSCAD after saving in Modex. VS Code's Local History keeps the versions you saved; in Desktop, File → Revert to… lists every version Modex wrote.

Limitations ​

  • A project opens as a canvas only; use Reopen With… to see its XML. There is no command to create a new project — create it in PSCAD.
  • In VS Code, PSCAD .out results are not read into Modex figures. In Desktop a run can be added to a figure, but runs are not listed in the Results sidebar.
  • In VS Code under Remote-SSH, WSL or Codespaces, AgenticEMT runs on the remote machine, so artwork needs PSCAD installed there.
  • Each host keeps its own copy of the package: installing AgenticEMT in VS Code does not install it in Desktop, or the other way round.

Reporting a problem ​

Include the Modex version, the AgenticEMT version, the title of the page the tab showed, and its detail line, word for word. In VS Code, Modex: Show AgenticEMT Log opens the log to attach; in Desktop, attach Help → Export Support Bundle….