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

Folders, modules and use

A folder is the unit of scope. Every design in a folder (.part, .assembly, .drawing, .circuit, .fea) and every .m function in it can be named from any other file in that folder with no import. Designs in other folders come in with use, which names a folder or a package, never a file. The file that holds a design can be split, merged or renamed without editing anything that uses it.

One folder

This folder holds plate.part, a package folder +hardware/ with standoff.part, and base.assembly. The assembly places the plate by name with no from, and the standoff from the hardware package.

runmat 0.7
std 1

part plate {
    sketch s on origin.xy {
        l1 = line(start = [0 mm, 0 mm], end = [80 mm, 0 mm])
        l2 = line(start = [80 mm, 0 mm], end = [80 mm, 50 mm])
        l3 = line(start = [80 mm, 50 mm], end = [0 mm, 50 mm])
        l4 = line(start = [0 mm, 50 mm], end = [0 mm, 0 mm])
    }
    feature body = extrude(profile = sketch.s, distance = 6 mm)
    output plate = { body = feature.body.body, part_number = "PL-080" }
}
runmat 0.7
std 1

part standoff {
    sketch s on origin.xy {
        c = circle(center = [0 mm, 0 mm], radius = 3 mm)
    }
    feature body = extrude(profile = sketch.s, distance = 10 mm)
    output standoff = { body = feature.body.body, part_number = "SO-M3-10" }
}
runmat 0.7
std 1

assembly base {
    use part plate as plate
    use part standoff from hardware as post {
        placement = { placement = offset, offset = { translation = [10 mm, 10 mm, 6 mm] } }
    }
}

Other folders and packages

A design in another folder comes in with from and a folder path, or through a folder alias. Here fixtures/clamp.part is placed twice: once by path and once through the alias fx.

runmat 0.7
std 1

part clamp {
    sketch s on origin.xy {
        l1 = line(start = [0 mm, 0 mm], end = [20 mm, 0 mm])
        l2 = line(start = [20 mm, 0 mm], end = [20 mm, 12 mm])
        l3 = line(start = [20 mm, 12 mm], end = [0 mm, 12 mm])
        l4 = line(start = [0 mm, 12 mm], end = [0 mm, 0 mm])
    }
    feature body = extrude(profile = sketch.s, distance = 8 mm)
    output clamp = { body = feature.body.body, part_number = "CL-20" }
}
runmat 0.7
std 1

use "./fixtures" as fx

assembly fixture {
    use part plate as plate
    use part clamp from "./fixtures" as clamp_a {
        placement = { placement = offset, offset = { translation = [0 mm, 0 mm, 6 mm] } }
    }
    use fx.part.clamp as clamp_b {
        placement = { placement = offset, offset = { translation = [60 mm, 0 mm, 6 mm] } }
    }
}

The forms of use

FormBrings in
use part plate as platethe part plate of this folder, in any file of it
use part clamp from "./fixtures" as clamp_aa design in another folder; .., ../wing and ./a/b work
use part skeleton from "//wing/skeleton" as ska folder by its path from the project root
use part skeleton from "//wing/skeleton" @ "R3" as skthe same, pinned to the released revision R3
use part standoff from hardware as postthe +hardware/ package (a.b is +a/+b/)
use "./fixtures" as fx (at file level), then use fx.part.clamp as clamp_ba folder alias and a design through it
use material aluminum from "./materials"a material from another folder
  • In an assembly, use part <name> as <occurrence> { … } is also the occurrence: it places the design and its block holds the placement, configuration and other occurrence fields. See Occurrences and mates.
  • Kinds: part, assembly and material. The kind keyword is part of the name: use part x never finds an assembly called x.
  • Drawings and interface frames name designs the same way: model = { part = hinge_mount }, model = { assembly = drone, from = ".." }, to = { frame = interface, part = skeleton, name = wing_ref, from = "./interfaces" }.

How a name resolves

  1. The same folder. Every design file in the folder, and every .m function in it (including private/).
  2. A from path or an alias. The folder it names, relative to the referring file, or from the project root with //.
  3. A package. from hardware looks for +hardware/ in the referring file's folder, then in each folder above it up to the project root, and takes the first it finds. A +hardware in cabin/ therefore shadows the project's +hardware for designs in cabin/, while other folders still reach the project's.

Subfolders are not in scope until a use names them. A .m function outside the folder comes from the MATLAB path, as in MATLAB: the project's source roots, its dependencies, then +pkg folders as pkg.fn.

Errors

ProblemDiagnostic
The design is not in the folderno part platter in this folder (did you mean part.plate?), at the use line
Two designs of one kind and name in one folderan error naming both files
Folders that use each other in a cyclean error at the use that closes the cycle. Shared and skeleton folders must flow one way.
A design named by its file path (from "plate.part", file = "arm.part", model = { file = … })an error at the reference that gives the symbol to write, such as use part plate as …, with from "./folder" for another folder. STEP sources keep their file paths.

This assembly names its part by file, so the check stops at the use line:

runmat 0.7
std 1

part plate {
    sketch s on origin.xy {
        c = circle(center = [0 mm, 0 mm], radius = 10 mm)
    }
    feature body = extrude(profile = sketch.s, distance = 2 mm)
    output plate = { body = feature.body.body }
}
runmat 0.7
std 1

assembly by_file {
    use part plate from "plate.part" as base
}

Printing and edits

Structured edits from the editor's commands and the agent reprint an assembly or drawing in the forms above.

Boards and their circuits

A board file belongs to one circuit and names it by symbol, as other designs do: use circuit flight_controller at the top of flight_controller.circuit.layout names the circuit that a .circuit file in the same folder declares. A circuit reuses another circuit, sheet or interface the same way: use circuit power, or use sheet buck from "./power" as reg for a sheet of a circuit in the folder power. Naming a design by its file (from "./power.circuit") is an error that gives the symbol to write. See Board layout.

On this page
  • One folder
  • Other folders and packages
  • The forms of use
  • How a name resolves
  • Errors
  • Printing and edits
  • Boards and their circuits