Skip to content

Reading settings

Theme
Text size
Line spacing
Reading width
Code text size
Dyslexia-friendly font · Motion

The .musa format

CompleteChecked against Musa CAD 0.8.0Verified

A .musa file is Musa CAD’s own drawing format. It is plain text: you can open one in any text editor and read it. Each line is one record, such as a layer, a line, a circle or a dimension. The first line says which version of the format the file uses, for example MUSACAD 45, and the last line is END.

The rule is simple:

  • Newer Musa CAD always opens older files. A file from version 0.1.0 opens in every later release.
  • Older Musa CAD cannot open newer files. When a release adds something to the format, files saved by it need that release or newer. An older release says Unsupported file format version and does not open the file.

So if you share drawings with someone, check that they have the same Musa CAD version as you, or a newer one.

Musa CADSaves formatOpens formats
0.8.0v45v1 to v45
0.7.0v39v1 to v39
0.6.0v38v1 to v38
0.5.0v36v1 to v36
0.4.0v33v1 to v33
0.3.0v20v1 to v20
0.2.0v20v1 to v20
0.1.0v14v1 to v14

To give a drawing to someone with an older release, export it as DXF, which every version reads.

Every format version, newest first: the release that first saved it, and what it added. This table is made from the comments in Musa CAD’s source code (release v0.8.0) when the wiki is built, so it is written by the developers, in their words.

FormatFirst written byWhat it added (from the source)
v45Musa CAD 0.8.0the objects' own transparency and ByBlock properties, where they have any. bottom first.
v44Musa CAD 0.8.0a spline by fit points: knots tolerance closed, the start and end tangents. the multileader style it follows.
v43Musa CAD 0.8.0PLFIT fit n x y ...: PEDIT Fit / Spline's vertices placed; PLTAN n t ....
v42Musa CAD 0.8.0MLSTYLE flags start end fill_mode r g b n [offset color_mode r g b lt_mode lt]... name desc.
v41Musa CAD 0.8.0LTBUILTIN i n e1..en: the drawing's own Dashed (0), Center (1) and Hidden (2). DIMTFAC idx factor: a style whose tolerance is not the value's height.
v40Musa CAD 0.8.0the dash pattern starts again at each vertex. NOPLOT idx: the layer is not plotted; LAYERDESC idx text: its description.
v39Musa CAD 0.7.0the label's angle and an arc-length dimension's leader.
v38Musa CAD 0.6.0a text's alignment point and own width factor: three more tokens. the decimal separator (its character code) and DIMZIN, before the name.
v37Musa CAD 0.6.0a polyline's widths ("W" and two per vertex) and its elevation and thickness. "W" and 2n widths, "Z" and elevation + thickness may end the record.
v36Musa CAD 0.5.0LTSCALEMODE psltscale msltscale. TIMES created updated edit_seconds; DWGPROP key value (strings space-escaped.
v35Musa CAD 0.5.0VPORTS: VPORT records (the model window's tiles) with VPORTACTIVE, and saved configurations as VPORTSAVE <name> <n> followed by n VPORTCFG records. VPORTS: the model window's tiles, then the saved configurations.
v34Musa CAD 0.5.0VPLAYER: a VPFREEZE line after a VIEWPORT record (the layers frozen in it) and VPFRZNEW lines after the layer table (layers frozen in viewports created later). VPFRZNEW idx: the layer is frozen in every viewport created afterwards.
v33Musa CAD 0.4.0the polygonal clip boundary, in image fractions, on the next line.
v32Musa CAD 0.4.0No note in the source.
v31Musa CAD 0.4.0paper-space viewports.
v30Musa CAD 0.4.0layouts: id, then the same fields a PAGESETUP record carries.
v29Musa CAD 0.4.0No note in the source.
v28Musa CAD 0.4.0ATTDEF = a TEXT record (+ modes as a 15th token) whose content line is. attribute lines that follow the name.
v27Musa CAD 0.4.0the GRADIENT second colour.
v26Musa CAD 0.4.0text style index (14th token). TEXTSTYLE height width_factor oblique name font (strings space-escaped).
v25Musa CAD 0.4.0UNITSFMT linear precision angular aprecision clockwise base_angle.
v24Musa CAD 0.4.0VIEW cx cy scale name and GROUP selectable n k1 i1 ... kn in name description.
v23Musa CAD 0.4.0the extra datum (ordinate axis / jog position / arc end angle).
v22Musa CAD 0.4.0No note in the source.
v21Musa CAD 0.4.0No note in the source.
v20Musa CAD 0.2.0TABLE entities + the TABLESTYLE table. A TABLE record carries the grid shape and the column/row sizes, then one line per cell (`span_cols span_rows align` followed by the raw text on the next line, since it may contain spaces). Older files simply have no TABLESTYLE/TABLE records. TABLESTYLE + TABLE. The style table first, so a TABLE can reference it.
v19Musa CAD 0.2.0dimension text override + text offset: two trailing fields on the DIM record (the offset) plus a third content line (the raw override, which may contain spaces). Detected by token count; v1-v18 dimensions load with no override and a zero offset, i.e. exactly today's derived placement. the label displacement inline, the raw override on its own line (it may.
v18Musa CAD 0.2.0raster IMAGE entities. IMAGEDEF records carry the payload (an external source path relative to the drawing, or base64 chunked across following lines because the format is line-oriented); IMAGE records place a definition with a transform + clip. Older files simply have no IMAGEDEF/IMAGE records. raster images. IMAGEDEF <pixel_w> <pixel_h> <b64chunks> <sourcelen>; then.
v17Musa CAD 0.2.0GD&T entities: FCF records (cell count, then one cell string per following line) and DATUM records. Older files simply have no FCF/DATUM records. GD&T. FCF <cellcount> px py rot style <props7> <override16>; then one RAW cell.
v16Musa CAD 0.2.0ISO 129-1 narrow-dimension fit. The shared DimOverrides block gains a 16th field (text_fit), so DIM goes 34 -> 35 tokens and LEADER/MLEADER 29 -> 30; DIMSTYLE gains text_fit BEFORE its name (the name absorbs the rest of the line, so a trailing field would be ambiguous) and is read by version, not token count. v1-v15 files load with text_fit = Auto, which is the default: so older drawings simply stop colliding. text_fit sits BEFORE the name, and its presence is keyed to the file.
v15Musa CAD 0.2.0dimension text decoration: three trailing fields on the DIM record (tolerance mode, upper, lower) plus a prefix line and a suffix line after it. Detected by token count (34 vs the v8 31 vs the pre-v8 16); v1-v14 dimensions load undecorated.
v14Musa CAD 0.1.0HATCH entities (boundary loops + pattern name/scale/angle/origin). Older files simply have no HATCH records. HATCH. One line: loop count, then each loop (vertex count + x y pairs), then.
v13Musa CAD 0.1.0per-leader arrow override block appended to LEADER/MLEADER records (the same override block dimensions use; detected by token count, older files => ByStyle). per-leader arrow override block.
v12Musa CAD 0.1.0per-entity CELTSCALE (linetype scale) for line/circle/arc/polyline, written as trailing CELTSCALE records (older files have none => 1.0); the LTSCALE global is still the LTSCALE record. per-entity CELTSCALE (linetype scale) for the dashing kinds. Decoupled trailing.
v11Musa CAD 0.1.0saved plot page setups (PAGESETUP records; older files have none).
v10Musa CAD 0.1.0a font-name line after the content of TEXT/MTEXT/LEADER/MLEADER records (older files have none => stroke font). font name on its own line (single-line; "" = stroke).
v9Musa CAD 0.1.0block definitions (BLOCKDEF..ENDBLOCKDEF) + block references (INSERT). Older files have no blocks; the keys simply never appear. model-space block references, then the block-definition table. A block's.
v8Musa CAD 0.1.0per-dimension style overrides (no overrides => ByStyle).
v7Musa CAD 0.1.0global LTSCALE. Readers reject newer versions; older files load fine (no layers => layer 0; no dims; no bulges => straight polylines; no mtext/mleader; no LTSCALE => 1.0).
v6Musa CAD 0.1.0MTEXT (paragraph text) + MLEADER (editable leaders). MTEXT and MLEADER. The MTextBlock numeric fields are written inline.
v5Musa CAD 0.1.0polyline per-vertex arc bulges. per-vertex arc bulges appended after props (only when any are present).
v4Musa CAD 0.1.0leaders + expanded DIMSTYLE (per-element colours, dim lineweight, arrow types).
v3Musa CAD 0.1.0text + dimensions + dimension styles.
v2Musa CAD 0.1.0layer table + per-entity properties.
v1Musa CAD 0.1.0geometry.

See Drawings from code for a short, tested example and the rules worth knowing.