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).
| Statement | Declares | Reference |
|---|---|---|
input <name> : <kind> = <default> | a parameter | Values and units |
let <name> = <value> | a named value, which may call a .m function | Values and units, MATLAB functions |
sketch <name> on <plane> { … } | a constrained 2D sketch | Sketches and constraints |
feature <name> = <operation>(…) | a step of the feature history | Features |
output <name> = { body, part_number, material, … } | a part the file delivers | Outputs, regions and published values |
material = { body, material } | a body's material | Outputs |
region <name> : <kind> = { select, expect, label } | a named, checked selection | Regions |
publish <name> = … | a region, value or frame other files read | Published values |
datum, tolerance, size, location, finish | semantic PMI | PMI |
configuration <name> = { … } | a member of the product family | Configurations |
link <kind> <item> to "<target>" | a traceable link | Links |
.assembly
An assembly file declares one assembly: assembly <name> { … }.
| Statement | Declares | Reference |
|---|---|---|
input, let | parameters and values, which occurrences can pass to their designs | Values and units |
use part <design> as <occurrence> { … }, use assembly … | an occurrence: a placed part or sub-assembly | Occurrences and mates |
connector <name> = { occurrence, anchor, offset, flip } | a frame that mates join | Connectors |
mate <name> = { kind, a, b } | a joint between two connectors | Mates |
pattern <name> = <layout>(seeds = […], …) | keyed copies of occurrences | Patterns |
mirror <name> = { seeds, plane, hand } | reflected copies | Mirrors |
fasteners <name> = { layout, fastener, stack, exceptions } | a fastener set along a path | Fasteners |
publish <name> = … | frames and values for the assembly's own users | Published 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 configurations | Options |
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> { … }.
| Statement | Declares | Reference |
|---|---|---|
format <name> = { size, title_block } | a sheet format and its title block | Formats and sheets |
sheet "<name>" = { format, scale, projection } | a sheet | Formats and sheets |
view <name> = <kind>(…) | a view of a part or an assembly | Views |
annotation <name> = <kind>(…) | a dimension, callout, GD&T frame, symbol, note or balloon | Annotations |
table <name> = <kind>(…) | a BOM, hole, revision, bend, weld or cut-list table | Tables |
How the files connect
- A part is self-contained. It can read published values from other parts (a skeleton) and
.mfunctions 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.