From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically get the states of case structure

Solved!
Go to solution

Dear all,

 

Is there a way we can programatically get all the states of a case structure in my VI.

 

I know that there is no property node for case structure, but I am sure there must be some way that labview ppl must have thought about it.

 

Awaiting....

 

cheers

Sree

0 Kudos
Message 1 of 11
(3,441 Views)
Solution
Accepted by topic author Sreedhar_T

Hi Sree,

it should be possible with scripting. As a start you can analyze the "Tunnel Wiring Wizard".

 

Mike

Message 2 of 11
(3,434 Views)
With scripting, there is a property node for the case structure and you can query the names of the cases.  You will need LabVIEW 8.6 or greater for scripting.  Get started here.  Note that scripting is unsupported, except through the scripting message board.
Message 3 of 11
(3,425 Views)
Any other way than procuring scripting license 😞
0 Kudos
Message 4 of 11
(3,394 Views)

Sreedhar T wrote:
Any other way than procuring scripting license 😞

 

Hi Sreedhar,

where is the problem, it's for free.

 

Mike

0 Kudos
Message 5 of 11
(3,386 Views)

I am not sure if its for free... I tried installing it. Now it is asking for activation code from NI License manager.

Could you pl confirm

 

Regards

Sreedhar

0 Kudos
Message 6 of 11
(3,373 Views)

Hi Sreedhar,

it's for free! It's for registration and to check if you have a valid LabVIEW license, i think it would not work with an evaluation version.

Read this for further information.

 

Mike

Message 7 of 11
(3,367 Views)
You can find an example of getting the names of the elements in a case structure here.
Message 8 of 11
(3,353 Views)

Kudos,kudos,kudos... the code works perfectly for me 🙂 Thanks a lot.

 

Mike, I think you are right, it will work on licensed labview machine. I tried on an evaluation one.

 

but do I need to register on internet after I install it ? does it mean that if I am using a machine which is not connected on internet, will it not work?

 

Regards

Sreedhar

0 Kudos
Message 9 of 11
(3,312 Views)
I think you need a machine with internet only for the registration/activation purpose, not for working normally after this...
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 10 of 11
(3,302 Views)