LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we change the property of each element of an array using property node or by other methods?

Hello all,

 

Can we change the property of the elements of an array. For example:

 

I have an array of combo-boxes. Can i have such a scenario that different combo-boxes of the array will have different items to select an item.

 

I am able to set the different "values" in different combo-boxes bu using "to be more specific class" property node.

But i could not set the different item list in different combo-boxes.

 

Please give me the solution.

0 Kudos
Message 1 of 11
(6,107 Views)

I do not think you can achieve what you want, as then the elements in the array are no longer "strictly" of the same type.

 

If you know beforehand how many elements you want, you may be better off just using a cluster which will allow you to do what you want.

0 Kudos
Message 2 of 11
(6,093 Views)

Hello Ankit,

 

at first I wanted to write a reply similar to nrp's. But with the combo- box there is a little difference to menu rings that makes it possible to have different menu entries. It is necessary to have "Allow undefined Strings" checked. Then You can attach different Strings[]- Lists to the control when clicked with the mouse. I attached a simple VI to show the principle.

 

Greets, Dave

Greets, Dave
Message 3 of 11
(6,082 Views)

Thanks Dave, 

 

now I have learned something for today Smiley Very Happy

0 Kudos
Message 4 of 11
(6,070 Views)

In terms of the original question: This has been asked MANY times, and a simple search would have yielded the answer. With an array the only thing that can be different amongst the elements is the value. All elements share the same properties. If you need different properties then you need to use a cluster, and you can use the previous suggestion.

Message 5 of 11
(6,056 Views)

Thanks a million dave!!!!!

I have learnt a very new and innovative thing...

 

I just wanna ask you one more question in the above context.

Can i have listbox or combo-box in a table just like in an excel sheet where we can have listbox by using "data validation" property for different cells having different list.Can i have this in labview. Because for this i have to super-impose the combo-boxes on the table and treat them separately.

We have to take those combo-box values and put in table and then store it.I have attached one VI to show the scenario.

 

And this is the alternative solution of the array problem which u have already given. So please suggest me between the two or any alternative solution.

 

Thanks,

Ankit Madaan

 

0 Kudos
Message 6 of 11
(6,051 Views)

@Ankit Madaan wrote:

Thanks a million dave!!!!!

I have learnt a very new and innovative thing...

 

I just wanna ask you one more question in the above context.

Can i have listbox or combo-box in a table just like in an excel sheet where we can have listbox by using "data validation" property for different cells having different list.Can i have this in labview. Because for this i


This has ALSO been asked many times and the answer is always the same: no. You have to play tricks like using separate controls and moving the controls to the appropriate location if you don't want to use separate controls for each and every cell (like you did).

0 Kudos
Message 7 of 11
(6,038 Views)

Almost.  The Position property is different for different elements.

 

0 Kudos
Message 8 of 11
(6,023 Views)

What is the "position property"?

0 Kudos
Message 9 of 11
(6,020 Views)

Probably referring to the Array Element.Position property.  This is a property of the array container and not of the array elements since any element could appear in any of the positions.

 

Let's not even go the "value is a property" route. 

 

 

0 Kudos
Message 10 of 11
(6,009 Views)