LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

node property global variable

Hi Samer,
yes, try it please. You don´t need access to properties of a global variable. A global has only the value of the linked control/indicator. Use the reference of your control/indicator. With smerurios solution you can get the correct one.

Mike
0 Kudos
Message 11 of 17
(1,235 Views)
Hi Samer,
yes, try it please. You don´t need access to properties of a global variable. A global has only the value of the linked control/indicator. Use the reference of your control/indicator. With smerurios solution you can get the correct one.
Hi MikeS81,
 
I did as you told me...i used semercurio solution...but it is no way to read the elements in the listbox...
 
And i tried to read the size of the listbox "Liste de Bibliothèques et Process" but i didn't succeed...
 
I didn't know how to use the reference as u told me...could u show me ?
Thx,
Samer,
Download All
0 Kudos
Message 12 of 17
(1,232 Views)
Why do you want to use a Global variable to store your listbox?
Is it shared accross many vi(s)?
 
If so, have you looked into a Functional Global variable?  or Action Engine?
 
But typically, when using a GLobal variable, you do not need to have it's property, you just read or write to it.
 
Can you explain what you want to do with this listbox? 
 
R
0 Kudos
Message 13 of 17
(1,218 Views)
I thought that what I want is too simple but no one seems to understand me....
 
I have 2 subvis, in the first I want to write in the listbox and in the second I want to read it...To do so I created a listbox in a global variable....
 
The problem: After I created the listbox in the global variable i tried to write elements in the listbox (look vis below) but there it gave me an error...
 
Could you tell me where is the problem ?
And should i use node properties of the listbox ? if yes how to do so ?
 
Samer,
Download All
0 Kudos
Message 14 of 17
(1,212 Views)

Hi Samer,

a global is not the same as a local variable. If you write into a global the value in your control/indicator will not automatically be updated. See the attached example please. It shows how you can read and write data from/to a listbox using the reference. To get the reference you can use the code from smercurio.

Mike

0 Kudos
Message 15 of 17
(1,206 Views)
Hi Mike S81,

In the smercurio exemple i can obtain the name of the listbox as a string...(look file)

The question: how could I make a reference to this litsbox (I only have the na me of the listbox as a string) ?
Samer,
0 Kudos
Message 16 of 17
(1,201 Views)
Hi Samer,
with the example from smercurio you have all references on your Front Panel and you can read all the names. Search for your control name in this list and you can get the reference from the other array. Here is an example http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=29559#M29559, but pay attention if you use clusters or tab controls.
 
Mike
Message 17 of 17
(1,195 Views)