04-15-2024 08:56 AM
I want to make a tool that a Python user can call. I mentioned possibly activeX being a solution. I also mentioned the easiest way would be to have LabVIEW act as a wrapper for Python. But they wish to keep the languages separate (weird hatred for LabVIEW) and only wants to call the executable. But the executable would require inputs if they wish to run in an autonomous fashion.
So I was wondering, I've seen plenty of C based executables where you can call it in command line and type in stuff like, "myapp.exe -t do_thing" - something along those lines. Can LabVIEW make executables do similar? Where a Python user could call the executable in a command line and give all the controls the necessary inputs?
Solved! Go to Solution.
04-15-2024 09:12 AM
Yes, you can pass command line arguments to a LabVIEW EXE. Here are some old threads on the subject that contain good examples..
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHdICAW&l=en-CA
https://forums.ni.com/t5/Example-Code/Pass-Arguments-to-a-LabVIEW-built-Executable/ta-p/3493869
https://forums.ni.com/t5/LabVIEW/How-to-run-labview-exe-with-command-line/td-p/2859384
https://www.youtube.com/watch?v=4As_J7VPkqc
Hope that helps,
Craig
04-15-2024 09:12 AM
Yes, LabVIEW built executables can take command line arguments.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHdICAW&l=en-US
Some VI packages to make your easier with Command Line arguments,
https://www.vipm.io/package/sklein_lib_lv_argparse/
https://www.vipm.io/package/wiresmith_technology_lib_labview_cli/
04-15-2024 10:10 AM
Much appreciated! Thank you! Exactly what I was looking for.