Discussion:
Select from 2-D array
(too old to reply)
ofahed
2008-08-11 15:40:06 UTC
Permalink
Hello All! I was wondering if there is a better way to select data from a 2-D array then I have programmed in the attached VI.The VI should hopefully self-explainitory. Basically, the first column has multiple same strings that i would like to select and have returned the second column of those strings.Any help would be Great.:smileyhappy:Thanks in advance,Oliver


SelectTest.vi:
http://forums.ni.com/attachments/ni/170/348297/1/SelectTest.vi
smercurio_fc
2008-08-11 15:40:07 UTC
Permalink
In your first loop you're just populating the combobox. Not much else to do there. The second loop can be considerably simplified by simply auto-indexing your array:


SelectTest.png:
Loading Image...
ofahed
2008-08-11 16:10:06 UTC
Permalink
Ah Sweet, Thanks that is way simpler and way better wonder why i had to do it so difficult :) well sorry would like to give you a good rating but still working my way up to 50 posts :(
smercurio_fc
2008-08-11 16:10:07 UTC
Permalink
Don't worry about the rating. I don't take <a href="http://forums.ni.com/ni/board/message?board.id=BreakPoint&amp;thread.id=5415" target="_blank">much stock</a> in it.
ofahed
2008-08-11 16:10:10 UTC
Permalink
lol well then i give you a "Chuck Norris, Thumb Up" ;) for this answer. I also was wondering how you attach directly a image into a message, I've read it somewhere in this forum but i can't seem to find it again.
JoeLabView
2008-08-11 16:40:05 UTC
Permalink
You first attach the image file to a post.&nbsp; After it is posted, you right-click on the posted file and select copy shortcut.
To the right of your post you will see Options.&nbsp; Within it, select Edit Message.&nbsp;
Click on the mountain icon (insert an image) and paste the shortcut you copied earlier..
&nbsp;
The image will appear where you placed your cursor.
&nbsp;
See...
&nbsp;
<img src="http://forums.ni.com/attachments/ni/170/348300/1/SelectTest.png">
smercurio_fc
2008-08-11 16:40:05 UTC
Permalink
An image gets attached the same way you attach a VI or other file. You have to upload the image before you can include it in a message since the image needs to be hosted on a public server, and not your own private computer. Detailed instructions are <a href="http://forums.ni.com/ni/board/message?board.id=130&amp;view=by_date_ascending&amp;message.id=2786#M2786" target="_blank">here</a>. Note that you can usually combine steps 3 and 4 since when you edit the message you will see the link for the image below the message editing area, and you can right-click on the link and select the "Copy Link Location" (or whatever it's called for the browser you're using) to get the URL for the image.
smercurio_fc
2008-08-11 16:40:06 UTC
Permalink
Also, the <a href="http://forums.lavag.org/Code-Capture-Tool-file121.html" target="_blank">Code Capture Tool</a> is an excellent utility to grab screenshots of LabVIEW code for posting.
ofahed
2008-08-11 16:40:08 UTC
Permalink
<img src="Loading Image..."> <img src="Loading Image..."> Nice Thanks to you both Message Edited by ofahed on 08-11-2008 11:34 AM


SelectTest2.png:
http://forums.ni.com/attachments/ni/170/348330/1/SelectTest2.png


Dodgeball_31.jpg:
http://forums.ni.com/attachments/ni/170/348330/2/Dodgeball_31.jpg
JoeLabView
2008-08-11 16:40:08 UTC
Permalink
After you&nbsp;have installed the code capture tool, it is very easy to use.&nbsp; You select the tool from the menu and it offers options to select the Front Panel, the Block Diagram or both.&nbsp; It also automatically saves to file!&nbsp; :)
R
ofahed
2008-08-11 17:10:06 UTC
Permalink
Yup very true, nicer and faster then using the Print function as long it is just 1 VI. :)
ofahed
2008-08-11 17:10:09 UTC
Permalink
ohhh No is it not possible to edit the message anymore to remove the image of chuck norris, it was just a test. now he is going to stay there forever!? damn, i guess i have to consider more what i am posting :smileysurprised:
smercurio_fc
2008-08-11 18:10:07 UTC
Permalink
Editing of messages is limited to about 10 minutes after you've posted. Looks like Chuck is immutable. :smileyvery-happy:
ofahed
2008-08-12 08:10:05 UTC
Permalink
haha, yeah seems like it, :smileyhappy: oh well at least it will remind me of the 10 minutes chance to edit
Continue reading on narkive:
Loading...