From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Import ASCII dates with different format

Solved!
Go to solution

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

0 Kudos
Message 11 of 14
(1,078 Views)

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

0 Kudos
Message 12 of 14
(1,066 Views)

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

Message 13 of 14
(1,058 Views)

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 Smiley Very Happy).

 

Thanks again for the help. This forum is really good

Rafael

0 Kudos
Message 14 of 14
(1,050 Views)