RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
    • The design language
    • Values, units and expressions
    • Names and selectors
    • Folders, modules and use
    • MATLAB functions in design values
    • Checks and diagnostics
    • Agent tools and the command line
    • Feature status
    • Design commands
Docs>CAD

The design language

RunMat stores every mechanical and electrical design as a text file. A part, an assembly, a drawing, a schematic and a board each have their own file kind, and all of them share one grammar: the same header, values, units, names, comments and statement forms. The editor, the agent and the command line read and write the same text, so a change made in any of them is a reviewable diff.

File kinds

FileDeclaresHolds
.partpart <name> { … }One part: inputs, sketches, a feature history, outputs, regions, published values, materials, configurations and PMI.
.assemblyassembly <name> { … }Occurrences of parts and assemblies, connectors, mates, patterns, mirrors, fasteners, configurations and views.
.drawingdrawing <name> { … }Sheet formats, sheets, views of a part or an assembly, annotations and tables.
.circuitcircuit <name> { … }A schematic: sheets, ports, components, nets, buses, net classes, variants and simulation sections.
.circuit.layoutlayout <name> { … }The board for one circuit: outline, stackup, footprints, tracks, vias, pours, rules and fabrication settings.
.feastudiesSimulation studies. The FEA docs describe them.

The file kinds connect in one direction:

Loading diagram...
  • An assembly places parts and other assemblies by name. A drawing shows a part or an assembly by name.
  • A board reads its circuit: the components, nets and classes come from the .circuit, and the layout adds where they go.
  • A study reads geometry exported from a part or an assembly (STEP), with the region names the design gives it.

A first file

This part is a plate with three inputs. Every value carries its unit, and the feature names the sketch it extrudes.

runmat 0.7
std 1

// A flat plate. Change the inputs to resize it.
part plate {
    input width : length = 80 mm
    input depth : length = 50 mm
    input thickness : length = 6 mm

    sketch outline on origin.xy {
        l1 = line(start = [0 mm, 0 mm], end = [input.width, 0 mm])
        l2 = line(start = [input.width, 0 mm], end = [input.width, input.depth])
        l3 = line(start = [input.width, input.depth], end = [0 mm, input.depth])
        l4 = line(start = [0 mm, input.depth], end = [0 mm, 0 mm])
    }
    feature body = extrude(profile = sketch.outline, distance = input.thickness)

    output plate = { body = feature.body.body, part_number = "PL-100" }
}

The header

Every design file starts with two lines:

LineMeaning
runmat 0.7The language version the file is written in.
std 1The vocabulary version: the feature, mate, sketch and circuit words the file uses. A new word in a later vocabulary never changes the meaning of a file written against an earlier one.

Comments start with // and run to the end of the line. Blank lines and indentation carry no meaning; the formatter writes four spaces per level.

Statements

A file holds one declaration (part, assembly, drawing, circuit or layout) with a block of statements. Most statements have one of three shapes:

ShapeExampleUsed for
<word> <name> = <value>feature body = extrude(…), net GND = { global = true }Named items: features, outputs, regions, mates, nets, components
<word> <name> on <target> { … }sketch outline on origin.xy { … }Blocks that hold their own statements: sketches, sheets, stackups
<field> = <value>part_number = "AX-100", root = mainFields of the declaration itself

These statement forms are shared by every design file kind:

FormMeaningPage
input <name> : <kind> = <default>A parameter that configurations, runs and sweeps may set.Values and units
let <name> = <value>A private named value.Values and units
use <kind> <name> [from <folder>] [as <alias>]Brings a design from another folder or package into scope.Folders, modules and use
publish <name> = <value>A value, region or frame other files may read.Outputs, regions and published values
link <kind> <item> to "<target>"A traceable link to another file: derived_from, verifies, supersedes, supplier_doc.Outputs, regions and published values
constrain <relation>A sketch constraint.Sketches and constraints

Values, names and references

Values are numbers with units (80 mm, 30 deg, 10 kohm ± 1 %), strings, words, lists […] and records { key = value }. A reference names an item by its kind and name: input.width, sketch.outline, feature.body.face.end, net.GND. The kind keyword in front keeps references unambiguous when two items share a name.

  • Values, units and expressions lists the value forms and units.
  • Names and selectors describes how references reach faces, edges, occurrences, pins and nets.
  • MATLAB functions in design values shows how a value can come from a .m function in the same folder.

Folders are modules

A folder is the unit of scope. Every design in a folder can name every other design in it with no import: an assembly writes use part bracket as left for the bracket part anywhere in its folder. Designs in other folders and +package folders come in with use … from. See Folders, modules and use.

Checking a design

The editor checks a file as you type. The agent and the command line run the same check:

runmat-design check board/flight_controller.circuit

Every problem has a severity, a code, the place it is written and, for a root cause, the features that failed because of it. See Checks and diagnostics.

On this page
  • File kinds
  • A first file
  • The header
  • Statements
  • Values, names and references
  • Folders are modules
  • Checking a design