LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building Application Menu

I am trying to build an application that allows the user to open VI's using
a menu. I have tried using the VI Refnum control. I tried choosing "Class
Server..Browse" and selecting the VI that I want to open. That only produced
a white-space icon. Then I tried browing and dragging the VI file to the
box. This resulted in Labview crashing. Am I trying the wrong things?
If so, how do I do it. In case I wasn't clear, I want the user to be able
to choose "Spectral Sampling" from the run-time menu and have the Spectral
Sampling VI or application open. Is this possible?
Thanks,
Derek
0 Kudos
Message 1 of 3
(3,123 Views)
I think the direction you want to go is using VIServer. The attached snippet of code demonstrates how to start another VI and keep the first one running. Whenever the user makes a menu selection, you could run this code with the appropriate VI name to start it.

Hope this helps

Denis



"Derek Hoiem" wrote in message news:396f6fe0@newsgroups.ni.com...
>
> I am trying to build an application that allows the user to open VI's using
> a menu. I have tried using the VI Refnum control. I tried choosing "Class
> Server..Browse" and selecting the VI that I want to open. That only produced
> a white-space icon. Then I tried browing and dragging the VI file to the
> box. This resulted in Labview crashing. Am I trying the wrong things?
>
If so, how do I do it. In case I wasn't clear, I want the user to be able
> to choose "Spectral Sampling" from the run-time menu and have the Spectral
> Sampling VI or application open. Is this possible?
> Thanks,
> Derek
0 Kudos
Message 2 of 3
(3,123 Views)
Derek Hoiem wrote:

> I am trying to build an application that allows the user to open VI's using
> a menu. I have tried using the VI Refnum control. I tried choosing "Class
> Server..Browse" and selecting the VI that I want to open. That only produced
> a white-space icon. Then I tried browing and dragging the VI file to the
> box. This resulted in Labview crashing. Am I trying the wrong things?
> If so, how do I do it. In case I wasn't clear, I want the user to be able
> to choose "Spectral Sampling" from the run-time menu and have the Spectral
> Sampling VI or application open. Is this possible?
> Thanks,
> Derek

Yes this can be done quite easily.
I will first suggest you look at the examples one menus
and on the viserver.

You
can do this in a couple of ways
First you have to get the menus working, then you can:
1) setup a case stucture to call the appropriate VI or
2) use the VI Server functions to dynamically load the VI.

Kevin Kent
0 Kudos
Message 3 of 3
(3,123 Views)