03-15-2012 12:20 PM
Hi Rafael,
First parse the group name, then execute the following line to move the file cursor back to the start of the file and proceed with your DataPlugin as-is.
File.Position = 0
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-19-2012 03:19 AM
Hi Brad,
I was happy for the easy solution but it doesn't work.
the command doesn't do any thing, not to the line 0 not to the line x,
i'm still missing the first line of data.
For sure is something on my procedure, can you please check it ?
Thanks
Rafael
03-19-2012 01:28 PM
Hi caracasnet,
The oFile.Position = 0 did work, but where you had it in the code did not achieve your goal. In this case you don't want the string Block to start at the beginning of the file, you want it to start at the beginning of the second line, so you have 3 choices:
1) Declare the string Block after reading the 1st line and before reading the second line
2) Read DataPos=oFile.Position after reading the 1st line, then assign oBlock.Position=DataPos after creating oBlock
3) Use oFile.Position = 0, then Call oFile.SkipLine, then create oBlock, which by default uses the current file cursor
I used option 1) above, because it was simplest, here's the resulting DataPlugin,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-20-2012 03:37 AM
Wow, now i understand all the thing...
Thanks, i updated now and works with the extra code that i wrote yesterday, i just missing the point to probe if the channelgroup already exist to put dont load extra group and instead to create a new group (i will try by my self until i cannot more ).
Thanks again for the help. This forum is really good
Rafael