ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Labview Class to file?

Hi there,
I am playing around with the new Labview classes and i am thinking working with classes is pretty cool.
But i am not able to save the objekt to a binary file load them and use this data to initialize the Object with this data.

Its no problem write the state of Class to a binary file oder flatten the state to XML.
But i got a lot of troubles load them back.
0 Kudos
Message 1 of 6
(5,220 Views)
The simpley project attached should show the problem.
0 Kudos
Message 2 of 6
(5,209 Views)
I changed the example so that it works.
Please have a look.
 
 
Message 3 of 6
(5,190 Views)
Hi, oh pretty cool
The devil is in the details. thx very much.

I found a example (LV Example List Fundamentals objectoriented Read write data to file) which use the datalog object to save the LV Class.
Do you see a disadvantage at "my" way ? Or other fundamental differents ? Or is it still another way to Rome? 😉

greetings
0 Kudos
Message 4 of 6
(5,173 Views)

It depends on the file-format. You used a binary file, so this file will not be readable from outside of LabVIEW, but as you are saving a LabVIEW class, I don´t think that you want to load the data into any other application 😉

So your solution is fine, other formats have advantages (readable from other applications, advanced structuring possible etc.) but for your purpose the binary file seems just fine for me.

 

Message 5 of 6
(5,150 Views)
great help, thx very much.

greetings

0 Kudos
Message 6 of 6
(5,134 Views)