LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we create an array as a button?

I konw that my subject is not really clear....
I have files names in an excel project. I want to display all of this files like a button in the aim to open one, considering to files inside the excel file:
For instance : if I have 3 files : file1, file2, file3 the VI does a menu button with ONLY 3 solutions: file1, file2, file3 to permit to the user to clic on one of this 3 files.
Is it possible?

Message Edited by ramiral on 04-26-2005 04:50 AM

labview 7.0
0 Kudos
Message 1 of 10
(3,879 Views)
If i understand your question correctly you can read in the filenames from exel.

If you want the user to be able to select only the existing filenames then you could use a menu ring control and you can read the filenames into the control using a property node (string and values). Then wire the control to a case structure.

I'm hoping this is enough to solve your problem

Message Edited by Tristan on 04-26-2005 12:02 PM

0 Kudos
Message 2 of 10
(3,869 Views)
thank you for your answer. But it seems to me to be not clear ( menu ring control does not have input to insert inside names of files? )

Message Edited by ramiral on 04-26-2005 06:27 AM

labview 7.0
0 Kudos
Message 3 of 10
(3,865 Views)
do you have a basic instance that do a menu ring control with an array of 2 elements?
labview 7.0
0 Kudos
Message 4 of 10
(3,855 Views)
You can change the strings in a menu ring by using a property node. Right click on the control or the terminal and select Create>>Property Node. Then, find the [Stings] property and change it to write. Now, you can wire an array of strings into it.
Another option could be to use an array of boolean buttons and control how many buttons are visible and what the text is on each of them.
Use the example finder and search this site to find additional information about properties and property nodes.

___________________
Try to take over the world!
0 Kudos
Message 5 of 10
(3,844 Views)
I don't find how to do with the property node.. 😞
labview 7.0
0 Kudos
Message 6 of 10
(3,829 Views)
Here's an example on how to populate a ring or listbox.
0 Kudos
Message 7 of 10
(3,820 Views)
One possibility ....
0 Kudos
Message 8 of 10
(3,814 Views)
Thank you very much for your excemples.
The problem is that I don't really understand yet how a property node works even if I read the "help". I really need to work on it.
labview 7.0
0 Kudos
Message 9 of 10
(3,797 Views)
copied from labview manual:

-------------------------------
Use the Property Node to get and set various properties on an application
or VI. Select properties from the node by using the Operating tool to click
the property terminal or by right-clicking the white area of the node and
selecting Properties from the shortcut menu.

You can read or write multiple properties using a single node, however
some properties are not writable. Use the Positioning tool to resize the
Property Node to add new terminals. A small direction arrow to the right of
the property indicates a property you read. A small direction arrow to the
left of the property indicates a property you write. Right-click the property
and select Change to Read or Change to Write from the shortcut menu to
change the operation of the property.

The node executes from top to bottom. The Property Node does not execute
if an error occurs before it executes, so always check for the possibility of
errors. If an error occurs in a property, LabVIEW ignores the remaining
properties and returns an error. The error out cluster contains information
about which property caused the error.
If the Property Node opens and returns a reference to an application or VI,
use the Close Reference function to close the application or VI reference.
LabVIEW closes control references when that reference is no longer
needed. You do not have to explicitly close control references.

Implicitly Linked Property Nodes
When you create a Property Node from a front panel object by
right-clicking the object and selecting Create»Property Node from the
shortcut menu, LabVIEW creates a Property Node on the block diagram
that is implicitly linked to the front panel object. Because these Property
Nodes are implicitly linked to the object from which it was created, they
have no refnum input, and you do not need to wire the Property Node to
the terminal of the front panel object or the control reference. Refer to the
Controlling Front Panel Objects section of this chapter for more
information about control references.
---------------------------------

if you still don't get it, i suggest that you read the labview manual, or parts of it and take a look at a few example's supplied by labview
0 Kudos
Message 10 of 10
(3,782 Views)