Jump to content

Access class version numbers?


Recommended Posts

I have a LVOOP based plugin architecture (ie my customer can supply different drivers in the form of LLBs depending on what hardware they ship with the software)... Now, I would like to implement a method of my base class called GetDriverVersion (or something to that effect) so that my plugin-in manager can display to the user what version of a particular driver they are using (for debugging purposes / making sure the driver matches the hardware).

This led me to thinking about the class version numbers - it seems to me to be logicial to use the class's built-in versioning so that I only have to set a number once and that number will also help with transitioning to new versions etc. However, I cant seem to find the property node (at least I would presume it is a property node somewhere). Am I looking in the wrong place / anybody have any ideas where this information may be hiding?

(oh, and whatever method I use has to be supported in the run-time engine)

Thanks,

Shaun

Link to comment

The property node does exist, but it doesn't work in the runtime engine.

You can get the version in a very strange way... take an instance of the class and flatten it to a string. Then read this post for instructions on how to get the version number out of the flattened string.

That's the only mechanism I can propose that will work in the runtime engine.

QUOTE (Aristos Queue @ Apr 28 2009, 01:37 PM)

That's the only mechanism I can propose that will work in the runtime engine.
I thought of another option... you could read the XML file directly. The class version number is stored in plain text in the .lvclass file.
Link to comment

QUOTE (Aristos Queue @ Apr 28 2009, 02:38 PM)

The property node does exist, but it doesn't work in the runtime engine.

You can get the version in a very strange way... take an instance of the class and flatten it to a string. Then read http://forums.lavag.org/Flattened-LVOOP-Class-t11256.html&p=47637#entry47637' target="_blank">this post for instructions on how to get the version number out of the flattened string.

That's the only mechanism I can propose that will work in the runtime engine.

I thought of another option... you could read the XML file directly. The class version number is stored in plain text in the .lvclass file.

Wow - you responded quickly - thank you very much!

That seems to have got me out of a bind, and in case it helps anyone else, attached is the VI I put together (LV 8.6).

Out of curiosity, do you know which method (file or flattened object data) would be faster / more efficient? (I'm thinking that it probably depends on how big the class file is vs how much data the current object is carrying around with it)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.