multisim2kicad 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 Cameron Tacklind <cameron@tacklind.com>
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,128 @@
1
- # Temporary Holding Version
1
+ # multisim2kicad
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Convert NI Electronics Workbench designs — **Multisim** schematics (`.ms14`,
4
+ `.ms13`, …) and **Ultiboard** PCBs (`.ewprj`) — to modern **KiCad**
5
+ (`.kicad_sch`, `.kicad_pcb`, `.kicad_pro`).
6
+
7
+ Reading the proprietary containers is done by
8
+ [`electronics-workbench-decoder`](https://www.npmjs.com/package/electronics-workbench-decoder)
9
+ (`ewd`); this tool turns what's in them into KiCad.
10
+
11
+ > Work in progress. See [`plans/converter.md`](plans/converter.md) for the
12
+ > roadmap, what is and isn't translated yet, and every format finding so far.
13
+
14
+ ## Usage
15
+
16
+ Needs Node 20+ (or [Bun](https://bun.sh)).
17
+
18
+ ```bash
19
+ npx multisim2kicad path/to/Design.ms14 path/to/Design.ewprj # writes ./out/
20
+ npx multisim2kicad -o converted/ path/to/project-folder/ # every design in a folder
21
+ npx multisim2kicad -o libs/ "path/to/Stocked Components.prj" # an EW component database
22
+ ```
23
+
24
+ As a library, `import { convertProject, convertDatabase, parsePcbXml, ... } from "multisim2kicad"`
25
+ gives the converters, the parsers into a format-neutral IR, and the KiCad emitters.
26
+
27
+ ### From a checkout
28
+
29
+ ```bash
30
+ bun install
31
+ bun run dev -o out/ path/to/Design.ms14 # same arguments as the CLI
32
+ bun test && bun run typecheck
33
+ bun run build # dist/ (what npm ships)
34
+ ```
35
+
36
+ Releases are published to npm by CI (`.github/workflows/publish.yml`) when a
37
+ `v<version>` tag matching `package.json` is pushed.
38
+
39
+ Inputs can be the binary EW files or XML already decoded by `ewd`; the
40
+ design type comes from the file's contents, not its extension. A schematic
41
+ and a board with the same name in the same folder (`Main.ms14` +
42
+ `Main.ewprj`) become **one linked KiCad project**.
43
+
44
+ Output per project `<name>`:
45
+
46
+ - `<name>.kicad_pro`, with the board's design rules: Ultiboard's default
47
+ clearance, track width and via as KiCad's Default net class, nets with
48
+ their own clearance or width as further net classes, and the minimum
49
+ track width / board-edge clearance (plus `<name>.kicad_dru` when a board
50
+ sets separate clearances to pads or vias)
51
+ - `<name>.kicad_sch` (+ one file per sub-sheet / extra page) from the `.ms1x`
52
+ - `<name>.kicad_pcb` from the `.ewprj`
53
+ - `<name>.pretty/`: the board's footprints as a project library (one
54
+ `.kicad_mod` per EW footprint, unrotated and top-side), registered in
55
+ `fp-lib-table`
56
+ - `<name>.kicad_sym`: the schematic's symbols as a project library (one
57
+ symbol per part, named after the part in the EW database, multi-section
58
+ parts as multi-unit symbols), registered in `sym-lib-table`
59
+
60
+ When both halves are present they are linked the way KiCad expects:
61
+ footprints carry their symbol's sheet path, symbols name their footprint,
62
+ footprint values follow the schematic, and parts that exist only on the
63
+ board (mounting hardware, fiducials) are marked board-only.
64
+
65
+ ## What gets translated
66
+
67
+ PCB: board outline, the full copper stack (inner layers from the
68
+ lamination settings), copper tracks, every pad kind (round, square,
69
+ rectangle, rounded, custom shapes; SMD on the right side), vias, mounting
70
+ holes, footprints that keep each part's rotation and side (top or
71
+ bottom) with the part's own silkscreen/fab/courtyard drawings and its
72
+ reference and value text as placed in Ultiboard, power planes and copper areas as KiCad zones (net, clearance, thermal
73
+ and island settings), nets (pads, tracks and vias carry their nets),
74
+ silkscreen/mask/fab/courtyard graphics including arcs, board text, rule
75
+ areas, and 3D/mechanical/custom EW layers as named KiCad user layers.
76
+
77
+ Schematic: every page and hierarchical block as a KiCad sheet hierarchy,
78
+ parts with their real body graphics and Multisim's final reference
79
+ designators (multi-section parts as KiCad units), pins at the exact positions
80
+ Multisim wires attach to, orientation (rotation/mirror), wires, junctions,
81
+ power and ground ports, global/local/hierarchical net connectors, user net
82
+ names, buses (with bus entries; buses continued across pages), free text.
83
+ Shared supply pins of multi-section parts (an op-amp's V+/V- on every
84
+ section) stay connected the way Multisim wires them. One schematic unit maps to 10 mil so everything sits on a
85
+ KiCad grid.
86
+
87
+ An EW component database becomes KiCad libraries named after it. That is
88
+ a Multisim database project (`.prj` / `.usr`), or NI's master database
89
+ `MSCOMP_S.PRD` that Multisim installs under
90
+ `C:\ProgramData\National Instruments\Circuit Design Suite\<version>\database\`
91
+ (about 57,000 parts and 7,000 footprints; around two minutes). Convert
92
+ NI's database for your own use only: it is NI's content, so don't
93
+ redistribute the output.
94
+
95
+ - `<name>.pretty/`: every Ultiboard footprint stored in it
96
+ - `<name>.kicad_sym`: every component, drawn from its Multisim symbol
97
+ (sections as units, pin numbers from its package, pin electrical types,
98
+ reference prefix from its family; pins Multisim hides, like a logic
99
+ chip's GND / VCC, on an extra power unit), with its Footprint pointing into
100
+ `<name>.pretty` when the database holds the package (otherwise the
101
+ package name is kept as an `EW_Package` field)
102
+
103
+ both registered in the project's lib tables.
104
+ `plans/converter.md` tracks these.
105
+
106
+ ## Checking results
107
+
108
+ ```bash
109
+ bun run test # unit + sample-design tests
110
+ bun run typecheck
111
+ bun run corpus # convert a whole corpus and score it (see below)
112
+ ```
113
+
114
+ `bun run corpus` converts every design under `corpus/` (gitignored — put your
115
+ own designs there), checks each output with `kicad-cli` (ERC/DRC, netlist
116
+ export), and scores it against EW's own data: the schematic's KiCad netlist
117
+ vs Multisim's netlist, and the share of PCB net pins that landed on a pad.
118
+ Report: `out/corpus/report.md`.
119
+
120
+ `bun run scripts/parity.ts <output-folder>` checks converted projects that
121
+ have both a schematic and a board: the schematic's KiCad netlist against the
122
+ board's pad nets, compared as connectivity (net names aside), plus which
123
+ footprints are linked, board-only or orphaned.
124
+
125
+ `kicad-cli` is always run through `scripts/run-hidden.ps1`, which starts it
126
+ on a private Windows desktop so no KiCad window or warning dialog can appear
127
+ on screen; any dialog it raises is logged and closed. Set `KICAD_CLI` to
128
+ point at a different `kicad-cli.exe` (default: KiCad 10).