Modex - Modelica Editor with AI
Diagram, icon, and text editor for Modelica models with AI-powered modeling, editing, and simulation

Modex brings a full-featured, synchronized diagram + icon + text editing experience for Modelica models directly into VS Code.


Features
- Build with AI — any coding agent connects to Modex via MCP. Describe a system and get a complete diagram — components, parameters, and wiring.
- AI Popover — double-click anywhere on the canvas to summon AI. Create components, edit parameters, and search the library instantly.
- Diagram Editor — drag-and-drop component placement, connection routing, and visual annotation editing for Modelica models (
.mo files).
- Icon Editor — edit component icons with shape primitives and coordinate transforms.
- Text Editor — syntax-highlighted Modelica text editing with live diagnostics, synchronized with the graphical views.
- Simulation — configure, run, and inspect OpenModelica simulations from within VS Code (requires a local OpenModelica installation).
- Plotting Workbench — interactive time-series plots for simulation results.
- 3D Animation — play back VisXML / multi-body animations from simulation output.
- Library Management — browse, install, and manage Modelica libraries from the OpenModelica package index.
- AI Assistant —
@modex chat participant for model editing, analysis, and simulation via GitHub Copilot Chat or direct Anthropic API.
- Modelica Debugger — step through simulation execution with GDB-based equation debugging.
Requirements
- VS Code 1.100.0 or later
- OpenModelica (optional) — required for simulation and debugging. Library installation works without OpenModelica. Set
modex.simulation.omcPath or ensure omc is on your PATH.
- Claude Code or GitHub Copilot (optional) — for AI assistant features. Claude Code is auto-detected when installed; alternatively use the
@modex chat participant via GitHub Copilot, or configure a direct Anthropic API key.
Getting Started
- Install the extension from the VS Code Marketplace.
- Open a folder containing
.mo files, or create a new one.
- Open any
.mo file — the Modex Diagram Editor opens by default.
- Use the Modex sidebar (activity bar) to browse libraries, workspace models, simulation runs, and plots.
Extension Settings
| Setting |
Default |
Description |
modex.simulation.omcPath |
"" |
Path to omc executable (auto-detected if empty) |
modex.ai.provider |
"auto" |
AI provider: auto, claude-code, copilot, or anthropic |
modex.ai.model |
"" |
Override model ID for the AI provider |
modex.ai.claudeCode.executablePath |
"" |
Path to claude CLI executable (auto-detected if empty) |
modex.ai.claudeCode.allowedAgentTools |
["Read", ...] |
Claude-native tools auto-allowed without user confirmation |
modex.ai.claudeCode.disallowedAgentTools |
["Bash", ...] |
Claude-native tools auto-denied |
modex.libraryIndexUrl |
"" |
Custom library index URL (defaults to OpenModelica public index) |
modex.libraryRoots |
[] |
Additional directories containing Modelica library packages |
modex.managedLibraryRoot |
"" |
Directory for installed third-party libraries |
modex.systemLibraries |
[] |
Additional system libraries to load on startup |
modex.loadLatestModelica |
true |
Auto-load the latest Modelica Standard Library |
modex.proposal.expiryMinutes |
15 |
Minutes before an AI-proposed edit expires |
Commands
All commands are prefixed with Modex: in the Command Palette. Key commands:
- Switch to Text Editor / Diagram View / Icon View — toggle between editing modes
- Simulate / Cancel Simulation
- Open Simulation Results / Open Animation
- Install Library / Upgrade Libraries / Refresh Library Index
- Set AI Provider API Key / Clear AI Provider API Key
- New Plotting Workspace / Save as Plotting Workspace
Known Issues
- This is a Preview release. Some features may be incomplete or contain bugs.
- Simulation and debugging features require a local OpenModelica installation.
- Large models may experience slower initial rendering.
License
See the LICENSE.txt file included with this extension for the full license agreement.
Privacy
This extension does not collect telemetry or send your model files externally. AI features (when enabled) send context to the configured provider. See modexai.io for the full privacy policy.
Third-Party Software
See the THIRD_PARTY_NOTICES.md file included with this extension for third-party license notices.
| |