I am trying to run the ironpython example you sent me and I get Could not
add reference to assembly HDF5DotNet.dll.
On Thu, Apr 18, 2013 at 4:59 PM, Mitchell, Scott - IS
scott.mitch...@exelisinc.com wrote:
HDF5DotNet won’t run in debug mode without some tweaking. The debug
builds of HDF add an extra ‘d’ into the name… hdf5ddll.dll, for example.
The HDF5DotNet libraries explicitly link to the release version. So you
need to manually change the code, the hdf dll names, or run HDF5DotNet in
debug mode but linking to the release HDF libs. Some of these options may
require some mods to the HDF5DotNet project as well.
Scott
*From:* Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] *On Behalf Of
*Charles
Henderson
*Sent:* Thursday, April 18, 2013 4:50 PM
*To:* HDF Users Discussion List
*Subject:* Re: [Hdf-forum] HDF5 and C#
okay I got IronPython for VS2010. I am having a problem running
HDF5DotNet in debug mode.
I have tried everthing. It will run without debugging. I know there is a
setting but can't find it.
On Thu, Apr 18, 2013 at 9:31 AM, Charles Henderson
charlesshender...@gmail.com wrote:
Well I have never seen IronPython so that will leave me in the same pickle
that I am in with 'C'. Is there anyway I can get some C# examples? I need
to know so I can tell boss whether we can do the project or not.
On Wed, Apr 17, 2013 at 11:05 AM, Gerd Heber ghe...@hdfgroup.org wrote:
Charles, how are you? Attached is a snippet of IronPython that does the
job.
I leave you the conversion to C# as an exercise. Ok?
G.
*From:* Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] *On Behalf Of
*Charles
Henderson
*Sent:* Wednesday, April 17, 2013 10:44 AM
*To:* HDF Users Discussion List
*Subject:* [Hdf-forum] HDF5 and C#
I am trying to convert one of the “C” examples into “C#” and not having
much luck.
“C” code:
#define FILEh5ex_t_cmpdatt.h5
#define DATASET DS1
#define ATTRIBUTE A1
#define DIM04
typedef struct {
int serial_no;
char*location;
double temperature;
double pressure;
} sensor_t; /* Compound type */
int
main (void)
{
hid_t file, filetype, memtype, strtype, space, dset, attr;
/* Handles */
herr_t status;
hsize_t dims[1] = {DIM0};
sensor_twdata[DIM0],/* Write buffer */
*rdata; /* Read buffer */
int ndims,
i;
/* * Initialize data. */
wdata[0].serial_no = 1153;
wdata[0].location = Exterior (static);
wdata[0].temperature = 53.23;
wdata[0].pressure = 24.57;
wdata[1].serial_no = 1184;
wdata[1].location = Intake;
wdata[1].temperature = 55.12;
wdata[1].pressure = 22.95;
wdata[2].serial_no = 1027;
wdata[2].location = Intake manifold;
wdata[2].temperature = 103.55;
wdata[2].pressure = 31.23;
wdata[3].serial_no = 1313;
wdata[3].location = Exhaust manifold;
wdata[3].temperature = 1252.89;
wdata[3].pressure = 84.11;
/* * Create a new file using the default properties. */
file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* * Create variable-length string datatype. */
strtype = H5Tcopy (H5T_C_S1);
status = H5Tset_size (strtype, H5T_VARIABLE);
/* * Create the compound datatype for memory. */
memtype = H5Tcreate (H5T_COMPOUND, sizeof (sensor_t));
status = H5Tinsert (memtype, Serial number, HOFFSET (sensor_t,
serial_no), H5T_NATIVE_INT);
“C#” Code:
string FILE = @c:\h5ex_t_cmpdatt.h5;
string DATASET = DS1;
string ATTRIBUTE = A1;
int DIM0 = 4;
int filetype, space, dset, attr, status; /* Handles */
sensor_t[] wdata = new sensor_t[DIM0];
int ndims, i;
/* Initialize data. */
wdata[0].serial_no = 1153;
wdata[0].location = Exterior (static);
wdata[0].temperature = 53.23;
wdata[0].pressure = 24.57;
wdata[1].serial_no = 1184;
wdata[1].location = Intake;
wdata[1].temperature = 55.12;
wdata[1].pressure = 22.95;
wdata[2].serial_no = 1027;
wdata[2].location = Intake manifold;
wdata[2].temperature = 103.55;
wdata[2].pressure = 31.23;
wdata[3].serial_no = 1313;
wdata[3].location = Exhaust manifold;
wdata[3].temperature = 1252.89;
wdata[3].pressure = 84.11;
/* Create a new file using the default properties. */
H5FileId FileID = H5F.create(FILE, H5F.CreateMode.ACC_TRUNC);
/* Create variable-length