cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Way to convert mcd to xmcd

nileshwankhade
1-Visitor

Way to convert mcd to xmcd

Hi All,
Is there any way to convert the "*.mcd" files to "*.xmcd" using command line option with mathcad.
I mean without opening Mathcad and calling "SaveAs" option

Regards,
Nilesh
9 REPLIES 9

No, although in principle it would be possible to write a script that would automate the conversion process if you need to convert a large number of files.

Richard

I had something working a while back that would call Mathcad using a command line. The Mathcad document would write a text file with "done" in it when the end of the document was reached. The script used a Windows XP add-on tool called "sleep". Not pretty, but it worked. Don't know if I can find examples of it now. Richard's comment about a script suggests to me that perhaps there are some here who have addressed it and can write scripts better than I.

Come to think of it, I wasn't saving the Mathcad documents. I was just running them.

Rich
http://www.downeastengineering.com/

My experiences here are limited. OTOH, it is possible to write a script/batch file to run Mathcad over a number of files in a directory (for example). OTO, it is possible to create a macro to save the files once they are loaded. Ideally, Auto Calc would be turned off for the file save process. But getting the two processes to work together is something I have not seem.

Theoretically, you could write a macro using a 3rd party that would
- click a *.mcd file in a directory
- stop calculation when the file is loaded
- save the file as *.xmcd
- close Mathcad
- repeat the loop until all files in the directory are processed.

3rd party recorders have come a long way, and might be worth a look. Depends on how many files you have to convert.

Rich
http://www.downeastengineering.com/

- Open the file in notepad++

- Save as new (I just used the standard file output)

- New file is good to go

LucMeekes
23-Emerald III
(To:Sonther)

I don't think that will work.

An (older) Mathcad .MCD file is either an ASCII file (up to and including Mathcad 6) or a binary file (until at least Mathcad 11) the structure definition of which was never published. The (newer) Mathcad .XMCD file is an XML structured file. I should expect that Mathcad 14 and 15 will complain about the file contents, when the contents of a .MCD file is presented to them as a .XMCD file.

And, while I value Notepad++, I don't think it is capable of translating any of the .MCD structures to XML. I would be very happy if it did...

 

Luc

Werner_E
25-Diamond I
(To:LucMeekes)

I guess that nileshwankhade  after more than 11 years already succeeded in converting the files - which way ever. Furthermore the suggested procedure using Notepad++ (I also doubt that it will do any conversion) is exactly what nileshwankhade tried to avoid - was asking for command line solution to be able to automate the procedure.

Not sure what  @Sonther  actually tried, but you are absolutely correct that opening a *.mcd file just renamed to *.xmcd results in an error when trying to open it with Mathcad 14 or 15 ("is not a valid XML Document").

Sonther
4-Participant
(To:Werner_E)

Hey guys.

Might be you are right he was trying to automate the process as he actually pointed out not wanting to use "Save As". 

Reason I converted using Notepad++  was because I were having trouble opening the files in Mathcad. And couldn't use Mathcad to Save As. But Notepad++ did manage to convert the files using Save As and I could read the files in Mathcad afterwards.

 

All in all, it worked for me 😄 

Can someone please help me to convert this file, so that I can Open it in PTC Mathcad Prime 5.0.0...i cannot open the mcd files or convert them.

Here it is.

Announcements

Top Tags