Error 1527 At Unflatten From String With LabVIEW Class Built in Packed Project Library

Updated Aug 18, 2023

Reported In

Software

  • LabVIEW
  • TestStand

Issue Details

I developed a LabVIEW class (.lvclass). In one class method I used Flatten To String Function to convert the class data to binary string, which I stored in a variable. In another method, I used Unflatten From String Function to convert this string to class again. This method is called in TestStand and everything works fine.

I then built a Packed Project Library (PPL) and called the same method in TestStand by selecting it from the Packed Project Library . Running my TestStand sequence, I got the following error:

Error 1527 occurred at Unflatten From String
LabVIEW:  Attempted to read flattened data of a LabVIEW class that is not currently loaded into LabVIEW.
 
 

Solution

When you flatten a LabVIEW class into a string using Flatten To String function, the binary string also contains the qualified name of the LabVIEW class.

When the LabVIEW class (for example, TestFlatten.lvclass) is simply saved into a LabVIEW Project Library (for example, TestFlatten.lvlib), Flatten to String will return a binary string containing also TestFlatten.lvlib:TestFlatten.lvclass (which is the qualified name of the class).

However, when you build the LabVIEW Project Library (which stores the LabVIEW class) into a LabVIEW Packed Project Library (called, for example, TestFlattenObject.lvlibp), the qualified name of the class changes, also containing the name of the PPL, such as TestFlattenObject.lvlibp:TestFlatten.lvclass.

If you are trying to Unflatten a string value which you stored before building the PPL, the class name will be invalid, thus causing error 1527.

To solve the error, you need to execute the method to Flatten to String again after building the PPL in order to store the correct binary string value corresponding to the class built in the PPL.