ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Class Question - Adding the same VI to multiple classes. - Programming Techniques

All,

     I have somewhat of a simple error here. I'd like to add the same VI to two different labview classes, in the same project. Whenever I add the same VI with the same name (but copies in different locations) it chokes, but when I change the name of one of the copies and add it to the second project, it works fine. This seems a bit silly to me. I guess the solution would be to just not add the VI to either and call it. Is this a good programming technique? The VI doesn't use the class data at all, it simply does a simple data manipulation, but I'd like to use it in both classes. Thanks!

Regards,
Ken
0 Kudos
Message 1 of 2
(2,813 Views)

This is an excerpt from the LabVIEW Object Oriented Programming FAQ:

"A LabVIEW class is a type of project library. It is a project library dedicated to the task of defining a data type. Like a project library, the LabVIEW class defines scope and namespace for its member VIs, and a VI can be owned by one and only one LabVIEW class. "

 
0 Kudos
Message 2 of 2
(2,810 Views)