Skip to main content
4-Participant
September 5, 2023
Solved

How do I install a function to read and write in HDF5?

  • September 5, 2023
  • 2 replies
  • 2315 views

I am a beginner using PTC MathCAD9.0 30 day trial version.

I have a questions about how to install a function to read and write in HDF5.

 

When I contacted PTC, I was told
"In order to use custom functions in the latest version of Mathcad,

you will need to rebuild DELL from the provided source using Visual Studio, etc. (Please refer to the attached zip file.)

However, the custom function you are inquiring about is not a standard feature of Mathcad,

so our support cannot provide a detailed response. We are unable to provide a detailed response."

Please tell me how to rebuild DELL and to use the function.

Best answer by VladimirN

"Read and Write HDF5 format Files in PTC Mathcad": https://www.ptc.com/en/support/article/CS189647

 

Note:

  • โ€‹This custom DLL provided with this package has been built using HDF5 driver 1.8.11. Users should use the exact version of the driver in order to use the provided DLL as it is.
  • This specific version of HDF5 driver can be downloaded from here
  • User who would like to work with latest HDF5 driver should rebuild the source code provided in the package and create a new DLL using latest HDF5 driver.

2 replies

VladimirN24-Ruby IIIAnswer
24-Ruby III
September 5, 2023

"Read and Write HDF5 format Files in PTC Mathcad": https://www.ptc.com/en/support/article/CS189647

 

Note:

  • โ€‹This custom DLL provided with this package has been built using HDF5 driver 1.8.11. Users should use the exact version of the driver in order to use the provided DLL as it is.
  • This specific version of HDF5 driver can be downloaded from here
  • User who would like to work with latest HDF5 driver should rebuild the source code provided in the package and create a new DLL using latest HDF5 driver.
4-Participant
October 3, 2023

I changed the HDF5 driver and it worked. Thank you!

24-Ruby III
October 3, 2023

You're welcome.

21-Topaz II
September 5, 2023

Please tell me how to rebuild DLL

In the "12181319_wpMs.zip" distribution is a file "Mathcad_HDF.sln".  This is a Microsoft Visual Studio solution file version 10.  Currently Visual Studio is version 17 so there may be simple problems updating the file.  Visual Studio uses the "sln" solution file to control the build process of the Mathcad_HDF.dll.  Look at the screenshot in the zip file as it contains a screenshot with Visual Studio solution opened.  The build process of the DLL contains two processes a compile and a link.  HDF5 could be introduced in the Visual Studio DLL compile process or the link process not sure which is used here.  This forum is for Mathcad so is not really an appropriate place to detail how to use Visual Studio.

The current version of HDF5 is 1.14.2 not 1.8,11.  You can still get 1.8.11 files so you may not need to build a new DLL at all,  If you would be using a new build for the DLL it seems logical to use the new HDF5.

 

Now for a simple workround to get you going.  From https://www.hdfgroup.org/downloads/hdfview/?1693892954 download the HDF5 Group file viewer and install it.

Use it to open a HPF5 file and navigate to the array you need to import.  The array should be displayed in a window by itself.  Ctrl-A for select all.  CTRL-C for copy.  Now open a blank Excel spreadsheet and with cell A1 of a new worksheet type CTRL-V.  It is now possible to use Mathcad to read the worksheet.

 

Cheers

Terry

21-Topaz II
September 5, 2023