LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hdf5 dll documentation?

The user block is for non-HDF5 data at the beginning of the file.  Setting it just makes your file bigger (although, in theory, you could make your file smaller???), unless you need some proprietary data stored with your HDF5 data.  It is set at file creation using the properties.  Use the default settings for it and you will be fine.
0 Kudos
Message 11 of 18
(1,491 Views)
Well what I'm trying to accomplish is to save data and a user-supplied text about each file that is created. Maybe it would be better to create a dataset of the string type and stick it in there, but i only managed to do that in HDFView and not in LabView... How would I do that?
0 Kudos
Message 12 of 18
(1,489 Views)
The easiest way to do that is to store a string attribute attached to either the file or the dataset in question with your user supplied string.  The intermediate attribute VIs have one to do this.

If you want to use a dataset for your string (to use compression, perhaps), just typecast it to a U8 array and use the U8 array dataset VI.
0 Kudos
Message 13 of 18
(1,484 Views)
Yeah, that was my question a few posts ago. How do I attach an attribute to a new file instead of to a specific dataset?
The VI in question requires a loc_id which i only obtain _after_ having created a group/dataset/whatever.
Thanks for all the help, almost done!
0 Kudos
Message 14 of 18
(1,479 Views)
^^ oops thats not quite correct. The actual error is that the "location is not valid for an attribute" right after file creation. I'm using "H5A Create-Write String if exists.vi" which works once I've created a dataset...
0 Kudos
Message 15 of 18
(1,476 Views)
My apologies.  I thought you could attach an attribute to a file.  According to the documentation, you can only attach attributes to datasets, groups, or named datatypes.  I always attach to groups and datasets, so I never ran into this.
0 Kudos
Message 16 of 18
(1,472 Views)
Thats weird, I can attach attributes with HDFView if I select properties of the HDF root... Oh well, guess I'll use groups then.
Thanks again for all the help, now i can finally get on to my actual project.
0 Kudos
Message 17 of 18
(1,469 Views)
Root is a group.  You get a reference to it by specifying the path as "/".  I believe it always exists and you just need to open it.
0 Kudos
Message 18 of 18
(1,463 Views)