LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Object loaded and saved with Read and Write Datalog are not compatible with packed library

Hi all,

I often use packed libraries to distribute my software.

My problem is the following:

 

I save a LabVIEW object of a class (MyClass) that is not included in a packed library using "Write datalog" (for example saved file is MyObject.dat).

If I load MyObject.dat using "Read Datalog" but using "MyCLass" saved in packed library as "Record type", Read Datalog generates an error or anyway loaded data is inconsistent.

In other word, if I save an object using as "Record Type" MyClass not included in a packed library and then I load saved file using the MyClass included in a packed library, file cannot be loaded.

 

Can you help me?

 

Thank all

 

 

 

0 Kudos
Message 1 of 4
(2,519 Views)

I think you are running into an issue created by namespacing.

Point is, that lvlib as well as lvlibp create a level of namespacing:

Namespacing.PNG

 

I would expect that level of namespaces being part of the datalog file.

So essentially, if the class is not encapsulated in the very same namespace when reading in which it was written, it should fail with exactly the error you are describing.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,491 Views)

Thank you Norbert_B.

So, isn't there a workaround to avoid this problem?

 

Thanks

0 Kudos
Message 3 of 4
(2,471 Views)

There is a solution: The reading program must have the very same setup as the writing application.

 

Norbert

 

EDIT: Or drop datalog files and serialize your data while writing and reconstruct it during reading....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,463 Views)