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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

The file type is not supported, error, PTC mathcad prime 3

mkhazraei
1-Newbie

The file type is not supported, error, PTC mathcad prime 3

Hello All

Recently I have been working on my mathcad file which  include formulas and some pictures and it worked fine for a while. I was able to close it every single day  and open the file next day. But today I cannot open the file. The application I have on my system is PTC mathcad prime 3 and I havnot updated or change it since I installed it on my machine. I'm able to open other mathcad files but not this file. The log file says:

Exception data:

File being opened: C:\.....\Desktop\MyCalculation.mcdx

FileFormatException when processing file

System.IO.FileFormatException: File contains corrupted data.

   at MS.Internal.IO.Zip.ZipIOEndOfCentralDirectoryBlock.FindPosition(Stream archiveStream)

   at MS.Internal.IO.Zip.ZipIOBlockManager.LoadEndOfCentralDirectoryBlock()

   at MS.Internal.IO.Zip.ZipArchive.OpenOnStream(Stream stream, FileMode mode, FileAccess access, Boolean streaming)

   at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)

   at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)

   at Ptc.Controls.EngineeringDocument.OpenPackage(FileLoadResult& result, String fileName, Boolean newFromDocument)

   at Ptc.Controls.EngineeringDocument.OpenFileForWorksheet(String fileName, String extension)

I have attached the mathcad and log file. Can you please help me?

1 ACCEPTED SOLUTION

Accepted Solutions

Final option that I can think of is to compare the contents of the zip archive against a known working sheet.

I have 7-Zip on my computer, but I'm sure that a lot of archive programs will be equally suitable.

The #2 file had a folder added from a working P2 sheet , but perhaps this isn't the best idea.

I know that prime is very bad at reporting errors, perhaps copying files from the recovered archive to a working sheet will point to the offending file.

Its very difficult to know given that I don't have the update to open the document.

Regards

Andy

View solution in original post

10 REPLIES 10
RichardJ
19-Tanzanite
(To:mkhazraei)

If you have active maintenance you can ask PTC to try to recover your file.

Any idea why this is happening? I'm using mathcad on my company's computer. I do not have active maintenance.

RichardJ
19-Tanzanite
(To:mkhazraei)

Do you mean why it got corrupted? I have no idea, but you are not the first to post here about a corrupted file from Prime.

Unfortunately, a .mcdx file is not plain text. It's actually a zip file; you can rename one with a .zip extension, and unzip it to see the XML, which is plain text. Since your file is corrupted I can't do that though, so I have no way to fix it.

Hi,

as others have said, the zip archive is corrupt.

For reference try searching the web for "repair zip" - there are many free & paid for programs.

I used zip_repair & I think that only the doc_props folder in the archive was corrupt.

#1 is the initial recovered file & in #2 I have copied the missing (?) folder from another (P2) worksheet.

Have a try with these & see if they work, unfortunately I don't have P3 so I can't test it here.

If there are still issues then, hopefully, someone with P3 or above can continue to help.

Regards

Andy

Your recovered both files can not be opened in Prime 3.1 version (the same error as in the original document).

Final option that I can think of is to compare the contents of the zip archive against a known working sheet.

I have 7-Zip on my computer, but I'm sure that a lot of archive programs will be equally suitable.

The #2 file had a folder added from a working P2 sheet , but perhaps this isn't the best idea.

I know that prime is very bad at reporting errors, perhaps copying files from the recovered archive to a working sheet will point to the offending file.

Its very difficult to know given that I don't have the update to open the document.

Regards

Andy

Thanks for your help. I did what you recommend  but it didn't work. I was able to ask PTC to recover it for me. The recovered most of the contents but not all.

I will note that not the first arises a problem with opening of documents in Mathcad Prime after inserting of images in them.

I had a similar error in one of my Mathcad files. I'm posting to share what I found about the source of my particular error.

After restoring and old version of my file, I walked through the recent changes I had made to the document. closing and reopening it after each step to verify it wasn't corrupted yet. It turned out my error was caused when I changed the reference for an "include worksheet" to a file that had "#" in it's name.

Hope that helps somebody some day.

Josh,

Thank you for this tip.

Top Tags