Importing Mathcad .mcd files

Importing Mathcad .mcd files - AI can decode Mathcad .mcf files and convert them into usable SMath worksheets - 消息

#1 已发布: 2026/10/23 19:52:20
Gerard Lardner

Gerard Lardner

3个赞,共8个帖子。

组: User

I have found that Claude AI can, with a little help, decode .mcd files and convert them into SMath worksheets. You train it by uploading some Mathcad files with corresponding pdf files. It can then convert unknown .mcd files and convert them into other formats. It could even understand the use of add-ins such as WaterSteamPro and call them in the SMath version.
2位用户喜欢此帖子
Rafael H Padilla Velázquez 2026/10/24 00:00:43, ioan92 2026/10/24 09:44:26
#2 已发布: 2026/10/25 20:33:59
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

Can you please publish the Claude skill for this here?
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#3 已发布: 2026/10/30 13:31:12
Gerard Lardner

Gerard Lardner

3个赞,共8个帖子。

组: User

mcdconv_tool_v5.zip (67.06 KiB)已下载 46 次。
OK. Here is my first try. It appears to work correctly for the two or three old worksheets for which I had pdf print-outs as well as the original .mcd files. I also fed it the worksheets for Krieth Principles of Heat Transfer. At the time, I was using WaterSteamPro for properties of water, air and products of combustion for my own designs; hence some references to wsp.

If you get Claude to make significant additions to the method, e.g. confirming additional details in the binary file code, please share here.
已编辑 2026/10/30 13:32:48
1位用户喜欢此帖子
francesco rapuano 2026/10/31 09:56:40
#4 已发布: 2026/11/21 03:52:30
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

Hello,

I have used Claude to extend mcdconv_tool_v5 for a collection of 169 Mathcad worksheets from a textbook (see https://extras.springer.com/?query=978-3-642-55940-2). Most of them are Mathcad 7 files. The aim was a pure translation, without changing any algorithms. The result should open in SMath and calculate as far as possible. Here is a summary of what was added and what is still open.

Reader

Mathcad 7/8 file headers, more opcodes (program palette, Σ with and without limits, nth root, comparisons, column operator, vectorize, transpose, |x| as determinant or norm, image region and others), plot trees, bitmaps and embedded OLE/WMF pictures.

Translation

Programs (if/otherwise/for/while/break, local definitions) become SMath line() blocks.
ORIGIN 0: ranges used as indices are shifted, and their values are corrected where they are used as values.
Implicit loops: for() loops where the target index is not a bare range variable.
Multiple assignment [a, b] := … stays a multiple assignment.
Global definitions (≡) go into a block at the top of the sheet.
Units: Mathcad units that SMath knows with the same value are used directly. Sheet definitions like nm := 10^-9·m become SMath units, or are defined as units (‘nm) if SMath does not have them.
READPRN becomes importData with DocumentDirectory() and the long form for delimiters. Data files are copied next to the .sm.
stdev/var/mean etc. are mapped to the Statistical Tools plugin, with the population/sample factor where needed.
interp(cspline(…)) becomes the 3-argument splines of the Mathcad Toolbox plugin. READBMP and similar functions are taken from the Toolbox; bitmaps below 24 bpp are converted.
Missing Mathcad functions are rebuilt in a collapsed area “Mathcad replacements” at the top of the sheet (vec2col for M⟨j⟩ := v, corr, axis helpers).
Images: embedded pictures become picture regions; Mathcad image regions become Image Region plugin regions (from a file or a matrix).

X-Y plots → XY Plot plugin

315 of 316 plots are translated.
Curve data are computed beforehand in a collapsed area above each plot (plot1a.x, plot1a.y, plot1a := augment(…)); the placeholder only holds sys(plot1a, …).
QuickPlots and constant traces go into the placeholder directly; a 0 trace becomes an axis cross label [0 0 “+” 1000].
Axis limits left empty in Mathcad are computed at run time through the plot’s properties (“plotN’XAxis”), with nice tick spacing and number format.

Layout

A separate step spreads the regions out, because SMath renders wider and taller than Mathcad. Region extents are measured from the SVG export of the SMath console. Note that this step requires an unlimited license. In principle, this could be replaced by manual steps in the UI but that was not tested.
Overlapping neighbours are moved right or wrapped to a new row. The results before and after are compared and must be identical.

Status for the 169 sheets

All of them convert.
With 20 s of calculation per sheet, 103 open without any error, and 24 do not finish within that time.
Remaining problems: Minerr (no counterpart yet), 3D plots, line styles of plots, some functions not available in SMath, and overlapping text in a few places.

Plugins needed: XY Plot, Image Region, Statistical Tools, Mathcad Toolbox.

Everything was done in the linux sandbox of Claude and has not been tested under Windows (except opening some of the worksheets in SMath).

Best regards, Martin Kraska

This is an example of the raw converter output.
grafik.png

mcdconv_v6_2026-11-21.zip (92.79 KiB)已下载 2 次。
已编辑 2026/11/21 04:01:33
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
ioan92 2026/11/21 15:20:09
  • 有新帖
  • 无新帖