Hi all,
I am writing a utility program that generates a .h5 file for the
pre/post-processor SMS. The first thing SMS does is check for a scalar
dataset in the .h5 file called 'File Type' that contains the string "Xmdf".
If SMS fails to find this it will report a certain error. I am using the
HDF5DotNet 1.8.9 wrappers and generate the dataset with the following code:
Dim enc As New System.Text.ASCIIEncoding
Dim myType1 As H5DataTypeId = H5T.copy(H5T.H5Type.C_S1)
H5T.setSize(myType1, 5)
Dim mySpaceID As H5DataSpaceId = H5S.create(H5S.H5SClass.SCALAR)
Dim myDataSetId As H5DataSetId = H5D.create(xid, "File Type", myType1,
mySpaceID)
Dim h5str1 As New H5Array(Of System.Byte)(enc.GetBytes("Xmdf"))
H5D.write(myDataSetId, myType1, h5str1)
If I open my generated .h5 file in HDFView everything appears fine: the
scalar dataset is there and contains the string "Xmdf". However SMS will
not load the file and gives the error indicating that it cannot find the
'File Type' dataset. If I manually delete the 'File Type' dataset from
within HDFView and then manually add it back in, the file can be read by SMS
without a problem.
Can anyone explain if there is a difference between how I am writing the
string dataset and how HDFView writes the dataset, or what I can do to
attempt to solve the problem? SMS tech support have simply said "check the
way in which the dataset is being written".
Any thoughts/tips/pointers much appreciated!
Kind regards,
Andy Wiersma
···
--
View this message in context: http://hdf-forum.184993.n3.nabble.com/HDF5DotNet-vs-HDFView-write-string-dataset-tp4025303.html
Sent from the hdf-forum mailing list archive at Nabble.com.