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,116 Views)
The simpley project attached should show the problem.
0 Kudos
Message 2 of 6
(5,105 Views)
I changed the example so that it works.
Please have a look.
 
 
Message 3 of 6
(5,086 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,069 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,046 Views)
great help, thx very much.

greetings

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