From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How to open a text-file with notepad from labview-vi?

Solved!
Go to solution

Hello,

how can i execute a program from a vi?

I want to open a textfile with Windows7-Notepad after selelecting it from a file-path-control and pressing an open-button.

 

Thx for help

0 Kudos
Message 1 of 4
(8,571 Views)

SmokeCal_Main_BD.png

 

Put this in an Event case that handles the open button's value change.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 4
(8,560 Views)

Use the command line.  Something like cmd /c notepad c:\temp\blah.txt should work.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(8,558 Views)
Solution
Accepted by OnlyOne

Another option is the Open URL in Default Browser VI which is found in the help palette. If you use the Path to String function you can feed it the result as a URL and the Windows shell knows how to direct it to the default program, which is Notepad.

 

 

Edit -

 

Open TXT file.png


___________________
Try to take over the world!
Message 4 of 4
(8,541 Views)