The .musa format
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.
Which files open where
Section titled “Which files open where”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 versionand 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 CAD | Saves format | Opens formats |
|---|---|---|
| 0.8.0 | v45 | v1 to v45 |
| 0.7.0 | v39 | v1 to v39 |
| 0.6.0 | v38 | v1 to v38 |
| 0.5.0 | v36 | v1 to v36 |
| 0.4.0 | v33 | v1 to v33 |
| 0.3.0 | v20 | v1 to v20 |
| 0.2.0 | v20 | v1 to v20 |
| 0.1.0 | v14 | v1 to v14 |
To give a drawing to someone with an older release, export it as DXF, which every version reads.
Version history
Section titled “Version history”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.
| Format | First written by | What it added (from the source) |
|---|---|---|
| v45 | Musa CAD 0.8.0 | the objects' own transparency and ByBlock properties, where they have any. bottom first. |
| v44 | Musa CAD 0.8.0 | a spline by fit points: knots tolerance closed, the start and end tangents. the multileader style it follows. |
| v43 | Musa CAD 0.8.0 | PLFIT fit n x y ...: PEDIT Fit / Spline's vertices placed; PLTAN n t .... |
| v42 | Musa CAD 0.8.0 | MLSTYLE flags start end fill_mode r g b n [offset color_mode r g b lt_mode lt]... name desc. |
| v41 | Musa CAD 0.8.0 | LTBUILTIN 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. |
| v40 | Musa CAD 0.8.0 | the dash pattern starts again at each vertex. NOPLOT idx: the layer is not plotted; LAYERDESC idx text: its description. |
| v39 | Musa CAD 0.7.0 | the label's angle and an arc-length dimension's leader. |
| v38 | Musa CAD 0.6.0 | a text's alignment point and own width factor: three more tokens. the decimal separator (its character code) and DIMZIN, before the name. |
| v37 | Musa CAD 0.6.0 | a 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. |
| v36 | Musa CAD 0.5.0 | LTSCALEMODE psltscale msltscale. TIMES created updated edit_seconds; DWGPROP key value (strings space-escaped. |
| v35 | Musa CAD 0.5.0 | VPORTS: 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. |
| v34 | Musa CAD 0.5.0 | VPLAYER: 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. |
| v33 | Musa CAD 0.4.0 | the polygonal clip boundary, in image fractions, on the next line. |
| v32 | Musa CAD 0.4.0 | No note in the source. |
| v31 | Musa CAD 0.4.0 | paper-space viewports. |
| v30 | Musa CAD 0.4.0 | layouts: id, then the same fields a PAGESETUP record carries. |
| v29 | Musa CAD 0.4.0 | No note in the source. |
| v28 | Musa CAD 0.4.0 | ATTDEF = a TEXT record (+ modes as a 15th token) whose content line is. attribute lines that follow the name. |
| v27 | Musa CAD 0.4.0 | the GRADIENT second colour. |
| v26 | Musa CAD 0.4.0 | text style index (14th token). TEXTSTYLE height width_factor oblique name font (strings space-escaped). |
| v25 | Musa CAD 0.4.0 | UNITSFMT linear precision angular aprecision clockwise base_angle. |
| v24 | Musa CAD 0.4.0 | VIEW cx cy scale name and GROUP selectable n k1 i1 ... kn in name description. |
| v23 | Musa CAD 0.4.0 | the extra datum (ordinate axis / jog position / arc end angle). |
| v22 | Musa CAD 0.4.0 | No note in the source. |
| v21 | Musa CAD 0.4.0 | No note in the source. |
| v20 | Musa CAD 0.2.0 | TABLE 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. |
| v19 | Musa CAD 0.2.0 | dimension 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. |
| v18 | Musa CAD 0.2.0 | raster 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. |
| v17 | Musa CAD 0.2.0 | GD&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. |
| v16 | Musa CAD 0.2.0 | ISO 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. |
| v15 | Musa CAD 0.2.0 | dimension 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. |
| v14 | Musa CAD 0.1.0 | HATCH 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. |
| v13 | Musa CAD 0.1.0 | per-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. |
| v12 | Musa CAD 0.1.0 | per-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. |
| v11 | Musa CAD 0.1.0 | saved plot page setups (PAGESETUP records; older files have none). |
| v10 | Musa CAD 0.1.0 | a 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). |
| v9 | Musa CAD 0.1.0 | block 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. |
| v8 | Musa CAD 0.1.0 | per-dimension style overrides (no overrides => ByStyle). |
| v7 | Musa CAD 0.1.0 | global 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). |
| v6 | Musa CAD 0.1.0 | MTEXT (paragraph text) + MLEADER (editable leaders). MTEXT and MLEADER. The MTextBlock numeric fields are written inline. |
| v5 | Musa CAD 0.1.0 | polyline per-vertex arc bulges. per-vertex arc bulges appended after props (only when any are present). |
| v4 | Musa CAD 0.1.0 | leaders + expanded DIMSTYLE (per-element colours, dim lineweight, arrow types). |
| v3 | Musa CAD 0.1.0 | text + dimensions + dimension styles. |
| v2 | Musa CAD 0.1.0 | layer table + per-entity properties. |
| v1 | Musa CAD 0.1.0 | geometry. |
Writing a .musa file from a program
Section titled “Writing a .musa file from a program”See Drawings from code for a short, tested example and the rules worth knowing.