Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Mathcad prime 10
Getting an error when tried to save
"The file type is not supported.
Logfile is located at C:\ProgramData\PTC\MathcadPrime\Logs\MathcadPrime_Exception_20250505_102636.log"
I can't locate this file
Solved! Go to Solution.
As I feared, the log file is not much help, at least for me.
I can confirm that the READ_IMAGE function returns an error (which it should not and that trying to copy and paste the picture to embed it in the Prime file threw the error you mentioned.
It looks to me that Prime does not like the JPEG format your file was created in.
I opened your picture in an image editor and resaved it as JPEG. After that the file was half the size and Prime seems to be happy with it.
READ_IMAGE imports the file without any error and WRITEBMP correctly writes a rotated BMP file (you should add the extension BMP to the file name).
Dragging the file to Prime still fails but inserting the file via "right click - insert image" works OK.
I attach the modified Prime file with the embedded picture as well as the resaved pic.
I am surprised because I would expect that kind of error message when trying to open a file in Prime which is either damaged or no valid Prime file, not when saving a file.
Why are you unable to locate the log-file? You should be able to access it and open it with a normal plain text-editor.
Its doubtful that the logfile contains much useful information but without it I am not sure how we could help.
I understand that you are able to save the Prime sheet while the image is not yet embedded but Prime refuses to save after you inserted the jpeg file?
Are you able to post the jpeg-file in question here and maybe also the Prime sheet without the embedded picture?
I was able to get the log file.
File location : C:\ProgramData\PTC\Mathcad Prime\Logs\MathcadPrime_Exception_20250505_102636.log
Exception data:
File being saved: C:\Users\mprakash\OneDrive - T.F. Warren Group Corporation\Documents\Projects\10229 [22872DQ]-Kinder Morgan- El Paso,TX\Settlements\Tank settlement check.mcdx
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring(Int32 startIndex, Int32 length)
at Ptc.Controls.Core.ImageControl.GetImageExtension(Uri imageUri)
at Ptc.Controls.Core.ImageControl.GetRegionPersistentData(IS11NProvider s11NProvider)
at Ptc.Controls.Worksheet.RegionFactory.ConvertToIRegionType(DelegateFunction0`1 typeCreator, IS11NProvider s11NProvider, UIElement control)
at Ptc.Controls.WorksheetSectionSerializationStrategy.GetRegions(IS11NProvider s11NProvider)
at Ptc.Controls.Core.Serialization.McdxSerializer.BuildDocumentXml(IRegionCollectionSerializer regionCollectionSerializer)
at Ptc.Controls.Core.Serialization.McdxSerializer.Serialize(PackagePart part, Boolean useTempFile)
at Ptc.Controls.EngineeringDocument.SerializeWorksheet(Package package)
at Ptc.Controls.EngineeringDocument.SavePackage(String newFileName, IDocumentSaveOptions options)
... (Exception when getting additional data: C:\WINDOWS\SYSTEM32\ntd1l.dll)
As I feared, the log file is not much help, at least for me.
I can confirm that the READ_IMAGE function returns an error (which it should not and that trying to copy and paste the picture to embed it in the Prime file threw the error you mentioned.
It looks to me that Prime does not like the JPEG format your file was created in.
I opened your picture in an image editor and resaved it as JPEG. After that the file was half the size and Prime seems to be happy with it.
READ_IMAGE imports the file without any error and WRITEBMP correctly writes a rotated BMP file (you should add the extension BMP to the file name).
Dragging the file to Prime still fails but inserting the file via "right click - insert image" works OK.
I attach the modified Prime file with the embedded picture as well as the resaved pic.
Thanks. It works great!
My Prime10 (express) has no problem with inserting/embedding the .jpg and saving the worksheet, see attached.
But I suspect the problem you experience is with manipulating the file data with Prime.
Oh, and being on express, the READ_IMAGE function doesn't work, it's a Premium function...
Success!
Luc