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

Values, units and expressions

A design value is a number with its unit, a reference to another value, or an expression of them. The compiler checks the dimension of every value against where it is used: a sketch coordinate takes a length, a revolve angle takes an angle, a resistor value takes a resistance. Values are stored in SI units, so 80 mm, 8 cm and 0.08 m are the same length.

Value forms

FormExampleMeaning
Quantity80 mm, 30 deg, 10 kohmA number and its unit. A space separates them.
Number2.5, 4A dimensionless value, such as a count or a ratio.
String"PL-100", "R0402-10K"Text: part numbers, file paths, names that are not plain words.
Wordcut, third_angle, powerA choice from a fixed set, such as mode = cut.
List[0 mm, 40 mm], [feature.round, feature.slot]An ordered list; points and vectors are lists.
Record{ body = feature.body.body, part_number = "PL-100" }Named fields.
Referenceinput.width, let.half, feature.body.face.end, net.GNDAnother item's value or entity, by kind and name.
Expressioninput.width / 2 + 5 mm, -input.offsetArithmetic on values.
Tolerance10 mm ± 0.1 mm, 10 mm ± [0.02 mm, 0 mm], 10 kohm ± 1 %A nominal value with symmetric or [plus, minus] bounds.
Function callcamBaseRadius(lift = input.lift, rise = 120 deg)A value computed by a .m function. See MATLAB functions in design values.

Inputs

An input is a parameter of the design. Configurations, runs and sweeps set inputs without editing the rest of the file.

runmat 0.7
std 1

part spacer {
    input outer : length = 12 mm
    input bore : length = { default = 6.4 mm, minimum = 3 mm, maximum = input.outer }
    input height : length = 8 mm

    sketch ring on origin.xy {
        rim = circle(center = [0 mm, 0 mm], radius = input.outer / 2)
        hole = circle(center = [0 mm, 0 mm], radius = input.bore / 2)
    }
    feature body = extrude(profile = sketch.ring, distance = input.height)

    output spacer = { body = feature.body.body, part_number = "SP-12" }
}
  • input <name> : <kind> = <default> declares an input. The kind is required; the default is optional.
  • The record form { default = …, minimum = …, maximum = … } adds bounds. A value outside them is an error at the input. A bound may itself be an input, as maximum = input.outer is above.
  • A reference to an input is input.<name>.

Let values

let <name> = <value> names a value inside one file. Other statements read it as let.<name>, or by its bare name inside an expression. Lets are evaluated in dependency order, so a let may use another let written below it. A cycle (let a = let.b, let b = let.a) is an error.

runmat 0.7
std 1

part tab {
    input width : length = 40 mm
    let half = input.width / 2
    let height : length = let.half + 5 mm

    sketch s 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, let.height])
        l3 = line(start = [input.width, let.height], end = [0 mm, let.height])
        l4 = line(start = [0 mm, let.height], end = [0 mm, 0 mm])
    }
    feature body = extrude(profile = sketch.s, distance = 3 mm)

    output tab = { body = feature.body.body }
}

A let may state its kind (let height : length = …); the checker then compares the value's dimension with it.

Expressions

OperatorMeaningDimension rule
a + b, a - bsum, differencea and b have the same dimension
a * bproductdimensions multiply: length * length is an area
a / bquotientdimensions divide: length / length is dimensionless
-anegationunchanged
( … )groupingunchanged

Multiplication and division bind tighter than addition and subtraction, and ± binds loosest: 20 mm + 2 * 5 mm ± 0.1 mm is 30 mm with a tolerance of 0.1 mm.

Tolerances

A toleranced value carries its nominal and its bounds. Geometry and solvers use the nominal; checks read the bounds. In a .part, the size and location statements attach toleranced values to faces as PMI, which drawings and STEP exports carry (see Outputs, regions and published values). In a .circuit, a component's toleranced value sets the spread a tolerance study samples (see Simulation sections and measures).

WrittenNominalBounds
25 mm ± 0.1 mm25 mm24.9 mm to 25.1 mm
10 mm ± [0.02 mm, 0 mm]10 mm10 mm to 10.02 mm
10 kohm ± 1 %10 kΩ9.9 kΩ to 10.1 kΩ

Units

Mechanical files

.part, .assembly and .drawing values take these kinds and units:

Kind (as written after :)Units
length, distancem, cm, mm, um (also µm), in, ft
aream^2, mm^2
angledeg, rad
masskg, gram
real, dimensionless, count, integera bare number

A bare number where a length is expected is an error: write 5 mm, not 5. Imperial lengths read as written: 40 ft, 5.5 in, and a feet-and-inches length is a sum, 8 ft + 1.125 in. Board coordinates in a .circuit.layout are the exception: a bare number there is millimetres.

Electrical files

.circuit and .circuit.layout values take SI units with the SI prefixes T, G, M, k, m, u (also µ), n, p and f:

QuantityUnitExamples
Resistanceohm (also Ohm, Ω)10 kohm, 4.7 Mohm, 0.5 mohm
CapacitanceF100 nF, 10 uF
InductanceH2.2 uH
VoltageV3.3 V, 22.2 V
CurrentA20 A, 1 mA
FrequencyHz48 kHz
Times5 ns, 14 us
Power, energy, chargeW, J, C62.5 mW
ConductanceS1 mS
Lengthm0.2 mm; board lengths also take mil
TemperatureK, degC25 degC
Tolerance%± 1 %

The circuit printer writes quantities in SI units (10000 ohm), so a file reads back bit for bit; any of the forms above reads in.

Strings and words

A plain word (power, F.Cu, GND) needs no quotes. A name that is not a plain word is quoted: a net called +3V3 is written "net.+3V3" in a reference, and a pin 1 of C1 is "C1.1". File paths and part numbers are always strings.

On this page
  • Value forms
  • Inputs
  • Let values
  • Expressions
  • Tolerances
  • Units
  • Mechanical files
  • Electrical files
  • Strings and words