LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically Create GUI ?

Hi, I've searched but cant find an answer other than NOPE !, but here it goes anyway (in case LV 8.2 has improved things)

I'd like to great a list of controls of different data types (mostly numeric and boolean arrays), is it possible to create these dynamically at runtime, later using local variables (or another method)  to access their values ?.

I thought of using cluster to add the different elements together, but it seems you cant index and add the elements at runtime.  Any ideas ?.

0 Kudos
Message 1 of 17
(5,476 Views)
Well, you're right, the answer is no - but that doesn't necessarily mean that you are stuck. What is it that you are trying to accomplish? You know what they say vis-a-vie the skinning of cats...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 17
(5,473 Views)
Hi Mike,

     I have an address map (4 to 256+ locations long), each location can be a single bit or a 16bit number. The bits I want to display on the GUI as a boolean indicator, the numbers as numeric hex controls.   The problem is that this map changes on almost a daily basis and updating the clusters manually I'm using is a real pain.

I'd like a text file (of any configurations that suits) that contains a field for input type, name and address, that I can read into LV and create a GUI that reflects this, but I cant find a way to create the controls programatically.

My fallback plan is to create multiple instances of each location, making the appropriate one visible/invisible but lifes too short for that 🙂
0 Kudos
Message 3 of 17
(5,469 Views)
Can you post a screen shot of what the interface would look like? It sounds like there are a couple ways of geting to where you want to go, but I need a little help visualizing the screen. The basic idea is that you don't have to actually create large numbers of distinct control - all you need is to make it look like you are. And thankfully that's not very hard to do.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 17
(5,461 Views)

You can try searching the LAVA forums in the name of VI Scripting.

http://forums.lavag.org/LabVIEW-VI-Scripting-f29.html

- Partha ( CLD until Oct 2027 🙂 )
Message 5 of 17
(5,439 Views)
I'd go for an XControl, showing a boolean OR digital indicator (configurable via properties)

BTW, a similar question was posted earlier.


Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 6 of 17
(5,417 Views)

I have to echo Mike's request for an image showing what you would like.

Generally the suggested approach would be;

1) Exploit LV's controls "as is".

2) Establish an upper limit to the number of widgets and play games with hiding and showing off-screen objects.

3) Picture Control (see image for example of virtual controls).

Ben

Message Edited by Ben on 06-19-2007 08:47 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 17
(5,404 Views)
I'll hereby second (triple?) Mike's request for more info, because there's probably a very basic way to do this natively in LabVIEW.

Personally I wouldn't be afraid to use the Picture control if I were you and you needed this application to get very dynamic. One instant advantage of the Picture control is that it already "knows" how to draw LabVIEW controls complete with their value. You can do this by using the Get Image Invoke Node for a given control.

Here's a given example that can draw any arbitrary set of booleans or hex numerics using only a couple simple subVIs (this is 8.2.1).

P.S. Ben those are some fancy controls! Well done!!
Jarrod S.
National Instruments
0 Kudos
Message 8 of 17
(5,384 Views)

Off the top of my head, I would say the simplest solution would be an array of picture controls (where you can control the size of displayed array). Each element can have a picture of a boolean or a number. This would be more problematic if the user needed to interact with this map, so I would also say that you should post a mock-up of what a typical display might look like (and whether the user needs to interact with it).

Re. scripting - it's great, but I believe it would be too complicated for this kind of thing and I would not use considerable parts of it in production systems anyway.


___________________
Try to take over the world!
Message 9 of 17
(5,380 Views)
Thank you Jarod,
 
Those are LV controls that were worked over using tst's Control Customization Nugget and then rendered using the method you mentioned.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 17
(5,371 Views)