10-05-2006 11:13 AM
10-05-2006
11:31 AM
- last edited on
10-28-2025
10:18 AM
by
Content Cleaner
Message Edited by altenbach on 10-05-2006 09:33 AM
10-05-2006
11:38 AM
- last edited on
11-13-2025
02:00 PM
by
Content Cleaner
As altenbach indicated, you may not need to go with classes for something like that. However, if you find yourself needing to use classes and are still running 7.1, you can try OpenGOOP or dqGOOP. I've used both, with a preference towards dqGOOP. OpenGOOP is available from OpenG.org, and dqGOOP is available from dataACT. You can also try the old GOOP Toolkit, or Endevo's toolkit.
10-05-2006 11:41 AM
The easiest way is to upgrade to LV 8.2, and use the new built-in object system...![]()
But it's not so difficult in LV7 either.
First, you must make a custom control. i.e. a .ctl file, with 'strict type def.' That file defines your class data structure. Place a cluster with all your data in the control.
Then, you make a 'create object vi'. In that vi, you create a queue. The queue elements are of the type of your custom control.
The 'destroy object ' vi is simply a vi that destroys the queue.
The queue will hold the object data. One queue for every object.
The vi's are the object methods.
At any time, the queue holds only one element. Every method will read the element from the queue, perform any operation on it, and put it back into the queue. If you don't put it back on the queue, you loose your object's data...
And that's basicly it...
I would have attached a few example vi's for you... if only LV 8.2 would have allowed to save for a version more previous than 8.0.... ![]()
10-05-2006
12:15 PM
- last edited on
11-13-2025
02:00 PM
by
Content Cleaner
@smercurio_fc wrote:
As altenbach indicated, you may not need to go with classes for something like that. However, if you find yourself needing to use classes and are still running 7.1, you can try OpenGOOP or dqGOOP. I've used both, with a preference towards dqGOOP. OpenGOOP is available from OpenG.org, and dqGOOP is available from dataACT. You can also try the old GOOP Toolkit, or Endevo's toolkit.
And there's also GOOP Developer from Sciware and JKI which also supports inheritance.
10-06-2006 07:38 AM
10-06-2006 08:11 AM
You can create a VI dynamically by using VI scripting (check out the LAVA forums), but I'm not sure how that will help you as you will still need to write the code to perform the methods. If you mean creating instances by creating a new instance of an existing VI, then you could probably do this by using VI templates, but it would be slow, memory consumption would be big and I'm not sure that it would really be an object oriented approach since you would be duplicating the methods instead of duplicating the data.
Can you elaborate more on just what you had in mind?