02-08-2010 12:13 AM
02-08-2010 03:31 PM
Wirejunky,
LabVIEW has built-in object oriented programming capability. The links at Can I Use Object-Oriented Programming in LabVIEW? give a lot of great information on how to use it!
02-09-2010 02:02 PM
just created this fast (prob. better ways to do it). Here I also created the class itself.
Just a fast example. You can play with lots of more in there. Here I also created the class itself. Its fully possible to add a class to your project 🙂 With the create code at the beginning youve lots of class options to use.
02-09-2010 02:22 PM - edited 02-09-2010 02:23 PM
02-10-2010 08:37 AM
02-10-2010 08:45 AM
Corny wrote:just created this fast (prob. better ways to do it). Here I also created the class itself.
...
Just a fast example. You can play with lots of more in there. Here I also created the class itself. Its fully possible to add a class to your project 🙂 With the create code at the beginning youve lots of class options to use.
This reminds me of an expression we used when I graduated from my Navy "A School".
"Six months ago I didn't know how to spell Technician. Now I is one."
Nice post,
Ben
02-10-2010 09:50 AM
Ben,
Well, Navy...that explains a lot...
Hummer1
learning every day too.
02-10-2010 10:10 AM
WireJunky wrote:
Thanks Corny for your example! Learnt something new today. Now if only you didn't need to save the class first to disk... I am thinking of how you create classes in the project manager, where creating and adding the class to the project does not create a class file on disk. I am going to play around a bit and see if I cant get that type of behavior.
Ive also tried to not save it, and add the reference to the project by entering the type (string) "class" or "lvclass" (I think this is what you tried?, for folders you would use the string name "folder"), but then, it popped up as an unkown object in the project manager.
Perhaps if you think the class as a file (it is actually a file), and a folder in the project as a "virtual folder (it doesnt need to exist on HDD)" than perhaps it makes sense?!? (just something that popped to my mind) 🙂
02-10-2010 10:27 AM
ops didnt read your post entirely.. my bad. "fast reader" litirally (how the heck is that spelled). If its possible to add classes that are in memory and not HDD to project, inform if you find out (I didnt got it to work) 🙂
02-10-2010 12:12 PM
K, I played around abit and I got this to work. By using the AddItemFromMemory method and supplying it with the newly created class name I was able to add the class to the project without first saving the class to disk.
This creates a new class in the project manager....
Thanks Corny for your help so far!.... now the cherry on top would be to programmaticly set the access scope of the internal virtual folder of the newly created class.