LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW dynamicly created classes, used by reference

Solved!
Go to solution

I have convinced myself that I'm missing something simple, that there has to be an easy way of doing this.

 

Going to create a fairly large data structure (probably a few GB).  Each object will contain other objects in arrays.  These objects will in-turn contain other objects.  They will be created and destroyed rather dynamically.

 

As this is a lot of data, basically in an array, I don't want to worry about having to duplication each time the size of something changes.

 

Ideally, I'd like to create these objects, and only have the reference in the array (if something does change size, the duplication wouldn't have to propagate throughout the entire, larger data set).  The objects would just hang out in the memory manager, until I call them by reference.  Understanding I'd now have a more active role in memory management.  Something fairly straight forward in C++, etc.

 

LabVIEW tends to want to deal with classes in a 'per value' basis, and don't seem to have constructors/destructors. 

 

There has to be a simple way to accomplish this.  If so, my Google-fu has let me down.

 

The best I could come up with was putting the class/object in a Preallocated Clone Reentrancy functional global with a init, read and write option set.  Then keeping tabs of each newly created VI's reference in the array, and making the reference call to get at the object.  But, oh my, don't that seem wasteful.  There's got to be a simpler way I'm missing.

 

Thanks in advanced.

 

0 Kudos
Message 1 of 3
(2,174 Views)
Solution
Accepted by topic author jlguthri

It sounds like you want a "Data Value Reference"

LabVIEW has those read through the help file and look in the examples.   You'll find lots of good stuff  


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(2,142 Views)

I had actually tried this.  But I didn't have the inheritance settings right for the class... and gave up...

 

 

Thanks!

0 Kudos
Message 3 of 3
(2,106 Views)