I have used Packed Project Libraries (PPLs) in a couple of smaller projects before with mixed amounts of success. Now I have read all of the caveats/pitfalls and I have a pretty good understanding of how they work (same application instance but under a different namespace) but my main problem still comes down to this: Passing class references into PPLs just breaks and causes me severe headaches.
Here is the situation...I pass everything I need into my plugin VI as a variant because within the PPL, you can do 'variant to data' and even if it is a type definition it will collect the correct reference which is valid in my application. This doesn't work for classes - the variant to data node complains because the data type does not match:
Error out 2 throws error 91 whilst the others are fine - even the user event which is based on a type definition in a library - QMH.lvlib:ctl_Msg.ctl.
The reason for this is that the variant passed in Class.lvclass and the data type it's trying to convert it to is Plugin.lvlibp:Class.lvclass. Apples != Oranges. The problem is that it IS the same class so I don't see why I should get an error here (because QMH.lvlib:ctl_Msg.ctl also becomes Plugin.lvlibp:QMH.lvlib:ctl_Msg.ctl, right?). If the type/class version/mutation in the PPL is incompatible with the main application instance then throw an error but if it's just because the namespace is different I want to be able to use that class in my PPL.
Can I please tell LabVIEW somehow that Plugin.lvlibp:Class.lvclass is actually Class.lvclass (including any classes used inside) so that I can use it inside my PPL with the same data space.
This sort of transfer mechanism between namespaces is already sort of possible with the 'Get Exported File Path' VI, so can I have a psuedo-equivalent for classes please?
I know I can build Class.lvclass and all of it's dependent classes into a 'shared' PPL but that would mean shipping my re-use library as a PPL and all sorts of other reasons (like not shipping vi.lib as PPLs).
I'm not actually sure what the solution would look like - there are far more intelligent people than me on here who can put forward some ideas of how to implement the idea - all I know is that I want to be able to pass my class into the PPL and have it work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.