Hi all,
first of all many thanks to Ed Hartnett for the VB wrapper class and the
example provided to use NetCDF with VB.NET.
The example he provided (creation and writing/reading to/from a "test.nc"
file) works fine. I could also use own *.CDF file (from chromatographic
data).
The only problem that I experience is with string-arrays.
For example, my *.CDF file has a variable
char peak_name(peak_number, _32_byte_string) ;
with the two dimensions peak_number=7 and _32_byte_string=32
The data of the variable peak_name are therefore 7 strings (the peak names).
The data should be read by the code:
.
.
Case NetCDF.nc_type.NC_CHAR
vartext = New StringBuilder(dimlen - 1)
res = NetCDF.nc_get_var_text(ncid, varid, vartext)
If (res <> 0) Then GoTo err
Log("Var value: " & vartext.ToString)
.
.
I´ve got the error message "StringBuilder Buffer overflow". I recognized,
that I get no error message when the capacity of the StrinBuilder is 7*32
(the product of the two dimensions). But now the StringBuilder variable
vartext contains only one (the first) peakname.
What can I do to get all string values in the "peak_name" variable?
With best regards
H.J. Rieger
--
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info