From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unflattening LVOOP class from string in executable does not work

Your problem is that including the class does not cause it to be loaded - it simply puts it (and its dependencies) in the EXE. Then, when you pass the class along, the EXE asks "OK, does anyone know ClassC?", to which the answer is negative, since the class has never been loaded in the EXE.

 

If you add a constant of ClassC to the BD of receiver, that's enough to load it and then you don't get the error. Alternatively, you need to pass a command to load that specific class into memory dynamically, either from the EXE or from the source.

 

Also note that LV doesn't currently have a way of unloading classes, so once you load a class, it stays loaded until the process is shut down, which might have some implications if you have temporary classes or if you have large classes.


___________________
Try to take over the world!
Message 11 of 14
(1,218 Views)

"If you add a constant of ClassC to the BD of receiver, that's enough to load it and then you don't get the error. Alternatively, you need to pass a command to load that specific class into memory dynamically, either from the EXE or from the source."

 

You saved my day. I just put the message class to the BD of the receiver EXE and same problem solved. +1

Now I can send actor messages over network and dispatch them...

0 Kudos
Message 12 of 14
(1,085 Views)

Thanks to this chain, I am one step closer.  I was receiving the same error message using VI Server to communicate to a cRIO RT.  I added an isolation class so that I didn't pull every VI on the RT side into my PC project.  The isolation layer worked by the RT writing to a fairly generic static class, then the PC would read the static class.  I tested it and it worked great and both projects pulled in the static class, but nothing else!  However, I overloaded the RT class, but still wrote to the generic static class and I received the 1403 error.  I simply dropped the new overloaded class into my PC class VI and the error went away.  HOWEVER, that process sucked in the entire RT project into my PC project.  Soooo not cool.  I'm still pretty confused on why it didn't work, I thought the isolation layer should have prevented that.  I even tried to "more specific" my write to the generic class, but nothing has worked.  If anybody has any ideas I would really appreciate it.

THANKS!

0 Kudos
Message 13 of 14
(814 Views)

Almost 10 years later and I had exactly the same problem and couldn't figure out why my XML files are not working when building my project into an application. So many thanks for the help!

 

Small hint for everyone who doesn't want to put a constant of the class on the Block Diagramm, especially if you have a lot of classes to load. You can also use the "Get LV Class Defaul Value.vi" to load the class into memory. All you have to do is to load them and just ignore the object indicator of the VI.

 

(Maybe mark tst last post as a solution)

Message 14 of 14
(550 Views)