LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what vi object class for Array Subset?

Solved!
Go to solution

I am using VI scripting to create an array subset function.  The problem is that I cannot figure out what VI Object Class to wire to the New VI Object Node.  I have tried Function and Index Array, but both of those cause runtime errors that say the style selected (Array Subset) is not compatible with the class.

 

And just as a more general question, how do you determine the class to use in general?  I know that the purpose is that the class selected determines the type of refnum that is output, but I feel like every time I encounter this problem it's a matter of trial and error to determine what VI class will work.

 

As you know, an Array Subset function doesn't have a front panel counterpart, so I can't right click on it to create a reference to know what type it is...

 

Thanks for the help

0 Kudos
Message 1 of 7
(3,015 Views)
Solution
Accepted by topic author bmishoe

Use GrowableFunction for the vi object class and Array Subset for the style. GrowableFunction covers a multitude of nodes...

Message 2 of 7
(3,008 Views)

perfect, thanks...

0 Kudos
Message 3 of 7
(3,002 Views)

I just realized I did not answer your second question, probably because there is no good answer. In general, you can browse the class tree from the selector, trying to find the object you are looking for.  If you don't find it, look for things like it and choose the generic form (as in this example). There are a few hard-to-find items, like the flat sequence, that appear where you do not expect them, but you learn what these are over time. You are looking at the actual class structure of the objects in the LabVIEW source code, a class structure which grew over time in sometimes unpredictable ways, so some incoherence is to be expected. Unfortunately, changing it without breaking a lot of code could be difficult, so it will remain as it is.

 

Good luck on your project!

0 Kudos
Message 4 of 7
(2,993 Views)

do you know if NI provides a website that basically shows the entire tree?  every time I search for something like that, I can only find bits and pieces...in other words something that shows the entire class hierarchy that you see when you navigate the menu to choose a vi object class.

 

thanks again for the info 🙂

0 Kudos
Message 5 of 7
(2,983 Views)

Unfortunately, I do not know of such a document. However, the class browser can often help.  If you have not used it before, you can launch it by clicking View->Class Browser or clicking Ctrl-Shift-B. I usually go straight to the search dialog.

Message 6 of 7
(2,952 Views)

oh wow I didn't know this existed!

 

Thanks!

0 Kudos
Message 7 of 7
(2,950 Views)