Skip to main content
Best answer by terryhendicott

Hi,

 

A *,mcdx Prime file is actually a compressed zip file of subdirectories of xml files

 

Step 1) Copy the *.mcdx file so you do not loose the file.

Step 2) In windows explorer change view | show | file extensions if not already set

Step 3) Change the file extension from *.mcdx to *.zip

Step 4) Unzip this now archive file

You now have a collection of subdirectory and xml files.

 To go back after making any changes: is to zip the subdirectories and change the extension back to *.mcdx.

 

Cheers

Terry

 

2 replies

21-Topaz II
June 20, 2024

Hi,

 

A *,mcdx Prime file is actually a compressed zip file of subdirectories of xml files

 

Step 1) Copy the *.mcdx file so you do not loose the file.

Step 2) In windows explorer change view | show | file extensions if not already set

Step 3) Change the file extension from *.mcdx to *.zip

Step 4) Unzip this now archive file

You now have a collection of subdirectory and xml files.

 To go back after making any changes: is to zip the subdirectories and change the extension back to *.mcdx.

 

Cheers

Terry

 

14-Alexandrite
June 20, 2024

 

thank you so much it works 

25-Diamond I
June 21, 2024

Just out of curiosity - what would you use these exported XML files for?

14-Alexandrite
June 24, 2024

Hi Werner, 

I hope you are doing well. 

Well, after we do the clacultions in mathcad I have to have them as xml file so my co- worker Ahmed can use them in C# programming and Revit to design the constructions and verify the results. 

Is there any why that mathcad work alongside with C#. I read the user guide (

Example 2: MS Dev Studio C# WPF) Honsetly I didn't understand;(

It can also work  also, if I get the results in excel sheet. Is there a way to that?

25-Diamond I
June 24, 2024

So, as I understand now, all you want is to export some numerical results derived with Prime calculations in a format which could be read in by third party software, maybe a C# program?

XML is on open format and there is no standard for mathematical results. Furthermore the method described by Terry gives you the whole Prime sheet in a proprietary coded XML file(s). Seems not to be what you need.
You may either write a Prime program to write the data to an external XML file in a format and with tags you first would have to agree upon with your colleague. Quite some work and too much hassle, I guess.
Of course your colleague also could write a parser in C# which can extract the necessary data from the XML file (usually "result.xml") created by Terrys suggestion. But I would consider this far too much hassle , too.

 

Why not just export the data in a standard format like a CSV file? You can do this with the WRITECSV function and it should be not too difficult to read in the data with a C# program.

You also can export the data in an Excel sheet using the WRITEEXCEL function if this is preferred.
Lookup the section about reading and writing files in the help

About Functions for Reading and Writing Files

especially

CSV Data Files

Excel Data Files

If you experience problems exporting your data, come back, open a  new thread, ask your question and don't forget to attach your file and state which version of Prime you are using.