LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically get list of open tasks

How can I obtain a list of all the tasks that I have created, but not yet closed?
0 Kudos
Message 1 of 4
(3,606 Views)

Not sure what you mean by "tasks".  If you open an Application Reference and wire it to a Property Node, you can specify the AllVIs property that will tell you all of the VIs in memory for that application instance.  With this array of names, you could wire (in a For loop, processing each name) to an Open VI Reference, use the reference to open an Exec.State Property Node, and if the state is Run Top Level, you could abort the VI.  You might want to test that you are not "committing suicide" by aborting yourself ...

 

0 Kudos
Message 2 of 4
(3,572 Views)

Oops, I answered the wrong question.  If you only want the list of open tasks, you just need to output those VIs that are noted as Top Level (without worrying about aborting them, since that's not what you asked ...).

0 Kudos
Message 3 of 4
(3,571 Views)

Hi

 

If you mean DAQmx tasks, then use the property node for DAQ System (place a property node on the block diagram, right click and go to Select Class -> DAQmx-> DAQmx System)

 

in the properties of a DAQmx system, you can get list of tasks open.

 

if you need more help, be clear about what TASKS you mean

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 4 of 4
(3,557 Views)