LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

property node to check if running as executable

    I want my Vi to automatically know if it is being run as an executable or as a VI so that I don't have to keep redirecting my reference path whenever I go back and forth between building a *.exe and running the VI

  Is there a property node that checks??

  Thanks,  Kevin
0 Kudos
Message 1 of 11
(6,490 Views)

Try the "Kind" property of the Application class.

-D

Message 2 of 11
(6,488 Views)
And here is a VI...
Message 3 of 11
(6,452 Views)

I am in 8.2, can you reload the exe.vi in that version so that I can see it?

   Also, I do not think that the "Kind"  property is the correct solution for this, because the 'kind' of LV software (realtime, Full development, etc.) is independant of whether I am running it as an EXE or VI. 

  Thanks,  Kevin

0 Kudos
Message 4 of 11
(6,432 Views)

If your VI is running in the LabVIEW editor, Kind will return "Development System".  If your VI is running as an EXE, Kind will return "Run Time System".  So yes, Kind is what you need.

-D

0 Kudos
Message 5 of 11
(6,423 Views)
The "Kind" is the correct property to use to determine how to correctly set up the path. You're asking a different question now. You're now asking how to know which LabVIEW edition you have. To what level are you trying to discern this, and what does it affect in your application?
0 Kudos
Message 6 of 11
(6,418 Views)

OK, sorry I based my disbelief on the description from the Labview help which specifically contradicts what you guys are saying: So- I will just have to try it for my self  and see:

From the Labview Help topics for the Kind application: 

+++++++++++++++++++++++++
Application:Kind Property: 

Specifies the LabVIEW package installed on the computer, including invalid application types.

  1. Development System, including the Base Package, Full Development System, or Professional Development System
  2. Run-Time System
  3. Student Edition
  4. Embedded LabVIEW, including LabVIEW Real-Time
  5. Evaluation
  6. Custom
++++++++++++++++++++++++
0 Kudos
Message 7 of 11
(6,410 Views)
There is no contradiction. You simply need to determine whether the "Kind" is executable. If so, you need to do an additional "Strip Path" to remove the "Application.exe" item from the path.
0 Kudos
Message 8 of 11
(6,401 Views)
Here is the VI in LV8.2.

It is better to check if Kind = Run Time System than Kind <> Development System.
Why ? Some day or on some computer, you might use an evaluation version of LabVIEW and the property will then return Evaluate for the development environment.

0 Kudos
Message 9 of 11
(6,391 Views)
you guys are right,
  Labview help (in my humble opinion) is misleading with the phrase  "LabVIEW package installed on the computer"  this statement would imply that for my computer it would always output 'development system' since that is what is installed irrelevent of the method behind calling the VI

Thanks
0 Kudos
Message 10 of 11
(6,389 Views)