I'm currently running into an issue when dynamically loading classes:
When loading a class using Get LV Class Default Value from using the .lvclass file and casting the object wire using the To More Generic Class everything works perfectly fine.
Using the same class from a built library (.lvlibp) loading unsing Get LV Class Default Value works as well, but To More Generic Class fails with error 1448.
Is there some option I forgot to set before compiling the lib? Has anybody experienced sth similar?
Using LabVIEW 2011f2 (haven't tried with f1 or earlier)
Some additional information:
I'm trying to set up a plug in architecture as described in https://decibel.ni.com/content/docs/DOC-19176
The example code works on my machine (with minor changes). So I'm currently diving into my own PlugIn Base Class to see what's going wrong...
just for verification:
Error 1448 states: "LabVIEW: Bad type cast. LabVIEW cannot treat the run-time value of this LabVIEW class as an instance of the given LabVIEW class." This is the error you are seeing?
If so, i'd expect to have a broken inheritance hierarchy where you try to cast an object to its (missing/broken) parent. I think, in addition to Michael Lacasse's presentation, you should also check out LV Field Journal.
A more general discussion about pitfalls of PPLs can be found here.
I'm running into exactly the same issue. Can you tell me how you fix it?
sorry for the late answer, been on holiday.
Unfortunately I got stuck in the lvlibp hierachies; due to time constraints, I decided to not use this feature, also I find it pretty much annoying. My approach was to merge several lvlibs into one big lvlibp, but it seemed in my case that there were to many crossconnections so all I got was errors when compiling. Coupling and cohesion ....
I guess for the next project, I'll consider these issues right from the start and set up a hierachy, that fits into this constraints.
tihs one might clear the issue up a bit:
We#re not the only ones to run into this issue
It's a shame, but I haven't fixed it at all. Instead I abandoned the idea of using the plugin architecture and LVLIBP in this particular project.
It was a bit of a nice to hve feature by that time...
IMHO, the key to success is to consider all resctrictions / requirements before starting a lib. Trying to apply this on an existing lib is prone to cause problems.