06-27-2010 07:43 PM
Hi guys and gals.
This is my first post here, so go easy on me. I promise I have been using my best GoogleFu I have before posting here.
I am a self taught LabView hobbyist. I have been working on a User Interface for my Robot SAGAR. See some of my work so far (girlfriend used it as a class project, but we both worked together on it, which got me hooked on LV in the first place):
Now I am working on using LV and Google earth as a mission planner right now.
My question is this. I have a 2D array that stores the Lat/Lon of each waypoint. I's like to have that displayed on my
front panel as a table, with WP # (the 1st dimension array index), Lat and Lon all on line, like this.
More importantly, have the user able to select a full waypoint (or just the WP number would be ok ) and delete it either using del key or some other button on the panel.
I'm at a loss on how to do this. Ideas?
Thanks for the help!
Solved! Go to Solution.
06-27-2010 11:22 PM
Cure little robot.
You said you were using a table. I'd suggest using a multicolumn listbox. This way you can change the selection mode to "Highlight Entire Row". As for responding to the user pressing the delete key you can just use an event structure. See attached simple example. Note that some keyboard may label the Backspace key as "Delete". If you want to respond to this one, then you need to also see if the Char value is 8, which is the code for that key.
06-28-2010 03:53 PM
Wow, this looks just like i wanted. Thanks
Anyway to get it to use a 2D array of Long Ints instead of strings?
06-28-2010 04:04 PM
@madsci1016 wrote:
Wow, this looks just like i wanted. Thanks
Anyway to get it to use a 2D array of Long Ints instead of strings?
No. List box is text only. You can convert to numbers by using the string convert functions, like Fract/Exp String to Number.
06-28-2010 04:10 PM
I figured, just wanted to make sure to save any cpu cycles.
Thanks guys.
06-28-2010 04:12 PM
@madsci1016 wrote:
Wow, this looks just like i wanted. Thanks
Anyway to get it to use a 2D array of Long Ints instead of strings?
I'm not sure why you'd want integers for floating point numbers. The latitude and longitude numbers are floats, not integers. You can build a 2D array of numbers in the same way.
06-28-2010 04:18 PM - edited 06-28-2010 04:22 PM
Oops, I meant I had them as double, and not int.
I'm actually going to change my main VI to handle strings instead of double, since every loop i'm feeding them into the Google Earth API as strings anyway, so this would optimize my code. The only converting would take place would be when i read in the mouse position GPS coordinates.