LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to change value of array element using property node

Solved!
Go to solution

hello all : )

 

im using an array of combo-box. the size of array is not fixed.

i want to use the strings[ ] property of combo-box to enter selection texts but since i have placed it inside the array im unable to use this property.

i used 'arrayelem' reference property and connected property node to it but didnt got strings [ ] in the selection.

so is there any way i can use the strings [ ] property

0 Kudos
Message 1 of 12
(6,661 Views)

Is this helps?

combob_in_array.png

0 Kudos
Message 2 of 12
(6,643 Views)

no this wont help 

 

according to ur method i can only pass a string value to the combo box(similar to enum selection)

i want to pass an array  of strings to strings [ ] property of combo box so that user can have a list of selection

 

but thanx for trying Smiley Happy

0 Kudos
Message 3 of 12
(6,631 Views)

hmm, i see 🙂

I think it is not possible to have elements in an array with different properties. So you cannot have different strings[] property for different elements in the array.

But lets wait for a pro programmer for posting, we will see 🙂

0 Kudos
Message 4 of 12
(6,627 Views)
my problem doesnt requires different properties for arrray element i have attached an image file. please refer it. as can be seen in the image file each combo-box has same selections
0 Kudos
Message 5 of 12
(6,597 Views)
For that you can just us my vi, with an additional for loop.
0 Kudos
Message 6 of 12
(6,592 Views)

ok can u tell me what is 'array 2' in ur vi ??

if im not wrong than its reference of the 'array'

but if it is true then it shouldnt have different name

 

grrrr... can u post ur vi Smiley Surprised

0 Kudos
Message 7 of 12
(6,578 Views)

Array 2 is the reference to the Array.

 

The problem is Blokk used the built-in VI snippet to create that, which doesn't handle references very well.  The Code Capture Tool is a much better method to create snippets.  In his original code, those two property nodes were implicitly pointing to the Array control.  The LV VI snippet tool breaks those references.

0 Kudos
Message 8 of 12
(6,566 Views)

the picture what I posted is a snippet. It is a png file which also contains a vi:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2PkCAI&l=en-US

 

I have found this post. I am just reading it:

http://forums.ni.com/t5/LabVIEW/combobox-in-array-why-does-it-work-this-way/m-p/2146916/highlight/tr...

It might help...

 

hmm, it is more complicated as I thought :))

 

edit: just to be CLEAR: so you want to create a new selection LIST for each of the array elements (comboboxes)) OR you just want to set all the comboboxes to a particular value which is ALREADY in the combobox list??

0 Kudos
Message 9 of 12
(6,561 Views)

i tried blokks vi using for loop

it simply refreshed/replaced the last added string

 

but i want to enter same selections (array of strings) in each combo-box

0 Kudos
Message 10 of 12
(6,549 Views)