10-18-2012 01:55 AM
Hi!
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)
Cheers
Oli
10-18-2012 06:16 AM
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...
10-18-2012 06:24 AM
Oli,
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.
Norbert
10-18-2012 06:29 AM
Hi Norbert,
thanks for the suggestions; I've already read Nancys article, it might be worth to have a closer look...
See you next week in FFB
Oli
10-18-2012 06:39 AM
Sorry, yes. It's exactly the error you described!
01-21-2013 10:32 AM
Dear Oli,
I'm running into exactly the same issue. Can you tell me how you fix it?
thanks,
toto
01-30-2013 11:28 PM
Hi toto,
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.
Best Regards
Oli
02-18-2013 12:30 AM
Hi toto,
tihs one might clear the issue up a bit:
https://decibel.ni.com/content/thread/12998?tstart=0
We#re not the only ones to run into this issue
Best Regards
Oli
06-04-2014 04:48 PM
I am having the same error. How did you fix it?
Thanks.
06-05-2014 12:53 AM
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.