Ruth,
That I have tried and although I got the string dataset to work in C#,
I was not
able to get it to work with string attributes in C#. When converted to
VB I am
unable to direct cast a pointer to an intptr. Is is just a deficiency in the
dotnet wrappers?
Thanks,
--
William Hubler
Technical Services Specialist
Steward Observatory Mirror Lap
University of Arizona
Quoting Ruth Aydt <[email protected]>:
You might take a look at the user-contributed example for reading
variable-length strings that is found here:
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/HDF5dotNetEnv/examples/
On Jul 23, 2010, at 11:43 AM, [email protected] wrote:
Hello all,
It seems that I have hit a wall here. I have a program that reads h5 files.
Datasets (numerical), groups and attributes (numerical), I can read fine. I
now have some string attributes to read.
I have tried:
Dim fileId As H5FileId = H5F.open('f:\newDataFormat.h5",
H5F.OpenMode.ACC_RDWR)
Dim dsetId As H5DataSetId = H5D.open(fileId,"units")
Dim attrId As H5AttributeId = H5A.open(dsetId, "unit")
Dim strtype As New H5DataTypeId(H5T.H5Type.C_S1)
Dim read_data As string() = New string(0) {}
H5A.read(attrId, strtype, New H5Array(Of string)(read_data))
and when I look at read_data(0), it is nothing. I also get no errors.
I can make this work for integers, doubles and the like, but not
strings. Am I
missing something.
I am using VS 2008, vb.net, XP 64 bit and the .net hdf5 wrappers
after making
them work for 64bit.
Any help would be greatly appreciated.
Thanks,
--
William Hubler
Technical Services Specialist
Steward Observatory Mirror Lap
University of Arizona
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org