LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing unique record to file

is there a simple way to only record unique records??

i have a master list of items and only want to append new items to the list.
0 Kudos
Message 1 of 6
(2,955 Views)
If you mean a complex datatype when you say unique record you can use the datalog file type (.dat) to write a cluster of info to a file. THis will be stored as records in a binary format. Try looking at the datalog file type examples in LV. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 6
(2,955 Views)
Hello,

The way would do it is ...

Read the file, check if the records exixts, if not append it to the end.

André
"tomsch1" schreef in bericht
news:5065000000080000009FBE0000-1075935269000@exchange.ni.com...
> is there a simple way to only record unique records??
>
> i have a master list of items and only want to append new items to the
> list.
0 Kudos
Message 3 of 6
(2,955 Views)
it doesn't seem that simple as i can't get it to work.

i am forced into loading the file into an array, and then check multiple strings to see if they exist.

i am obviosly not seeing something

an example of reading a log file and writing to an existing log file only the unique lines may assist me in understanding what i'm doing wrong
0 Kudos
Message 4 of 6
(2,955 Views)
Hi tomsch1,

look at the example, i hope it does the thing you want to do.

Chris
0 Kudos
Message 5 of 6
(2,955 Views)
Hi,

try the Configuration File vi's (a subpalette of File I/O). They support a "unique key" / value structure as in typical windows .ini files. You would only have to convert your data into a string which can be saved as the value in the file. The data can also be saved in different sections, thus keeping different sets of key/value pairs in the same file.

Matthias
0 Kudos
Message 6 of 6
(2,955 Views)