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.

/
    • Get started with MCAD
    • MCAD file reference
Docs>CAD>MCAD

MCAD file reference

RunMat MCAD keeps each part, assembly and drawing in its own text file. This page lists every statement each file kind takes; the linked pages hold the full reference with examples. The design language pages cover what all design files share: the header, values and units, names, folders and use.

.part

A part file declares one part: part <name> { … }. The name matches the file name (bracket.part holds part bracket).

StatementDeclaresReference
input <name> : <kind> = <default>a parameterValues and units
let <name> = <value>a named value, which may call a .m functionValues and units, MATLAB functions
sketch <name> on <plane> { … }a constrained 2D sketchSketches and constraints
feature <name> = <operation>(…)a step of the feature historyFeatures
output <name> = { body, part_number, material, … }a part the file deliversOutputs, regions and published values
material = { body, material }a body's materialOutputs
region <name> : <kind> = { select, expect, label }a named, checked selectionRegions
publish <name> = …a region, value or frame other files readPublished values
datum, tolerance, size, location, finishsemantic PMIPMI
configuration <name> = { … }a member of the product familyConfigurations
link <kind> <item> to "<target>"a traceable linkLinks

.assembly

An assembly file declares one assembly: assembly <name> { … }.

StatementDeclaresReference
input, letparameters and values, which occurrences can pass to their designsValues and units
use part <design> as <occurrence> { … }, use assembly …an occurrence: a placed part or sub-assemblyOccurrences and mates
connector <name> = { occurrence, anchor, offset, flip }a frame that mates joinConnectors
mate <name> = { kind, a, b }a joint between two connectorsMates
pattern <name> = <layout>(seeds = […], …)keyed copies of occurrencesPatterns
mirror <name> = { seeds, plane, hand }reflected copiesMirrors
fasteners <name> = { layout, fastener, stack, exceptions }a fastener set along a pathFasteners
publish <name> = …frames and values for the assembly's own usersPublished values
part_number = "…"the assembly's part number
options = { axes, rules, groups, configurations }a configurable product: option axes, rules between them, effectivity groups and named configurationsOptions
exploded <name> = { … }an exploded state for drawings and instructions
view <name> = { from, up, default }a saved camera

Options

A configurable assembly declares its option axes, the rules between them and its named configurations; occurrences take when conditions on the axes. The validator checks that alternatives sharing an occurrence name are exclusive, that every legal configuration has each required occurrence, and that each named configuration obeys the rules.

runmat 0.7
std 1

part engine_a {
    sketch s on origin.xy {
        c = circle(center = [0 mm, 0 mm], radius = 40 mm)
    }
    feature body = extrude(profile = sketch.s, distance = 120 mm)
    output engine_a = { body = feature.body.body, part_number = "EN-A" }
}
runmat 0.7
std 1

part engine_b {
    sketch s on origin.xy {
        c = circle(center = [0 mm, 0 mm], radius = 45 mm)
    }
    feature body = extrude(profile = sketch.s, distance = 140 mm)
    output engine_b = { body = feature.body.body, part_number = "EN-B" }
}
use part engine_a as engine {
    when = { when = is, axis = engine, value = a }
    required = true
}
use part engine_b as engine {
    when = { when = is, axis = engine, value = b }
    required = true
}

options = {
    axes = [
        { name = engine, domain = { domain = enum, values = [a, b] }, default = a },
        { name = freighter, domain = { domain = bool }, default = false }
    ],
    rules = [
        {
            name = freighter_needs_engine_b,
            condition = { when = any, of = [{ when = not, of = { when = is, axis = freighter, value = true } }, { when = is, axis = engine, value = b }] }
        }
    ],
    configurations = [{ name = freighter, values = { engine = b, freighter = true } }]
}

.drawing

A drawing file declares one drawing: drawing <name> { … }.

StatementDeclaresReference
format <name> = { size, title_block }a sheet format and its title blockFormats and sheets
sheet "<name>" = { format, scale, projection }a sheetFormats and sheets
view <name> = <kind>(…)a view of a part or an assemblyViews
annotation <name> = <kind>(…)a dimension, callout, GD&T frame, symbol, note or balloonAnnotations
table <name> = <kind>(…)a BOM, hole, revision, bend, weld or cut-list tableTables

How the files connect

  • A part is self-contained. It can read published values from other parts (a skeleton) and .m functions in its folder.
  • An assembly places parts and assemblies by name, picks their configurations or sets their inputs, and mates them.
  • A drawing shows parts and assemblies by name and reads their PMI, properties and configurations.
  • A study (.fea) reads the exported geometry with the region names the part gives it; see Import and export.
On this page
  • .part
  • .assembly
  • Options
  • .drawing
  • How the files connect