LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to obtain a list (string) of all elements within a Global Variable?

LOL @ Ben!!  😄

Thanks tst.. 

Yes..  Unless you understand what I'm about to do, it does sound a bit crazy..

The intent is to populate a Global vi with test scripts.  They all look & feel the same, but contain variations of commands.  They are indexed by test name.  So each page on the Tab control would contain the same types of controls, simply different info.  Now the Globals is Not used while new tests are being created.  It is populated by a "create test vi" writes to a new page on the global.  Actually, it needs to create a String control on every new page, which I discovered is a bit of a challenge. 

And text files (ie Notepad) are not an acceptable solution 😞 .  It is a requirement that the scripts are in a Global Variable to be called by another test vi.

I need to investigate what tst proposed..  I'm not sure I fully understand it, but will look into it.

BTW, the idea is to use preloaded tests in the Global vi.  Not to create something on the fly and use it.. Of course, that would not make any sense. 😮

RayR

======================================

After reading tst's post once again, ok.. l can meet the requirement..  Now how do you programmatically add a page & string controls on the pages of a Tab Control (within a Global Variable.vi) ?

I guess Ben is not the only one who enjoys a challenge.  😉

Message Edited by JoeLabView on 11-01-2006 01:46 PM

0 Kudos
Message 31 of 47
(1,427 Views)
Adding a page is a method for the tab control (a scripting method, so you need scripting enabled).
 
To create a new control you will need to use the New VI Object primitive. This is not exposed by default when using the scripting keys, so you need to install some OpenG stuff to have it in your palette. You might be able to use some method to create a copy of an existing control, but I haven't found it.
 
To place a control into the tab, you need to use the Move method (also scripting) for that control and specify the tab (or the page) as the owner.

___________________
Try to take over the world!
Message 32 of 47
(1,418 Views)

Thanks tst,

I will explore this avenue.

RayR

0 Kudos
Message 33 of 47
(1,406 Views)
Out of curiousity why wouldn't a global holding an array of clusters (where a cluster holds the data required for a test), not work?
Message 34 of 47
(1,405 Views)

Thanks Matt,

I'll see if this could work. 

The original "design" is a request from the customer.  Basically, a String control holds the various scripts and the pages identify each test group.  I have to check if an adequate interface can be created and the Global could become a reservoir of some sort.

Who knows, this could be a solution..  Once again thanks! 🙂

RayR

 

Message 35 of 47
(1,401 Views)

JLV et al,

Have you seen the discusion of the new ranks that may be introduced?

http://forums.ni.com/ni/board/message?board.id=130&message.id=2868#M2868

Please add your opinions.

The tltile we choose may some day be yours!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 36 of 47
(1,379 Views)

Hi Ben,

As a matter of fact, I just came from that thread.

I don't know about that one.  I'm keeping quiet..  I'll just read for now.  😉

Thanks!

RayR

0 Kudos
Message 37 of 47
(1,367 Views)


@JoeLabView wrote:

The original "design" is a request from the customer.  Basically, a String control holds the various scripts and the pages identify each test group.  I have to check if an adequate interface can be created and the Global could become a reservoir of some sort.


I can't say that I understand the design (I didn't really try), but it sounds a bit weird.

Anyway, I don't know if I would use scripting in production code unless there was a really good reason to do so. I don't think that the scripting elements I refered to are unstable, but supporting it could be annoying, and unless you actually need dynamic generation of code, you could probably do some other way.


___________________
Try to take over the world!
Message 38 of 47
(1,365 Views)

tst wrote "I don't think that the scripting elements I refered to are unstable, ..."

I have personally experienced instability with scripting!

I have code that ran fine on my laptop that gives me an "insane object" when run on my tower at work.

I can not recomend scripting in an application that has to run.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 39 of 47
(1,362 Views)
It's funny that I almost got kicked off of the forum for talking about scripting a while back. I posted a couple of VI's that showed how to do some of the things you want to do. The post was removed from the forum and I was sent an E-mail stating not to talk about scripting. But now here we are. I have a good example that creates a VI adds a graph to the VI populates it and then shows the VI as a Child of the main VI. If you are interested please feel free to E-mail me.



Joe.
"NOTHING IS EVER EASY"
Message 40 of 47
(1,357 Views)