LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Command Line Arguments get file path from windows explorer

Solved!
Go to solution

Hello,

I'm trying to open a file with my labview application .exe, so I thought that windows was sending the file path double clicked in explorer as an argument but all I get is the filename of my exe.

Capture.PNG

 

Does anyone know how to setup windows or the application to get the filepath double-clicked from explorer which the file extension has been already associated to my exe?

 

Thanks!

0 Kudos
Message 1 of 3
(3,983 Views)
Solution
Accepted by topic author JimChretz

I am not sure I understand but I think you want your Labview program to open another file, like a perimeter file?

 

Have three basic choices.

Hardcode the path with file name into your program https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/constants/path.html

Use the file open vi and have the user select the file to open https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/express/express-input/filedialogblo...

Write your progam to accept a commandline argument https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHdICAW&l=en-US

========================
=== Engineer Ambiguously ===
========================
Message 2 of 3
(3,976 Views)

Hello!

the part I didn't know about was the "Pass all command line arguments to application" to activate in the builder, once done, it all works.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHdICAW&l=en-US

 

Thanks a lot!

0 Kudos
Message 3 of 3
(3,956 Views)