キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

how to open notepad file from labview?

My application requires a txt file to be opened and displayed.
the problem is, we are able to launch the notepad using "systemexec.vi".
but we want to launch the notepad with the appropraite file opened along with
launching of notepad.exe.

we don't want the user to interact with the "open file dialouge box" of
the note pad appliation.we just want the user to view directly the
required txt file.

how can we achive this?

rags
0 件の賞賛
メッセージ1/10
6,720件の閲覧回数
Hi Rags

notepad accept commad line argumets so you can call it passing arguments such as the file name to open.
Try this "notepad.exe " at the command line input of the system exec function.

Bye,

Alessandro.
Alessandro Ricco
0 件の賞賛
メッセージ2/10
6,704件の閲覧回数
Hi,
All you have to do is use the "systemexe.vi" and generate a path like for example :- notepad.exe "C:\Documents and Settings\viveks\Desktop\ftp.txt" this is given to the command line argument in systemexe.vi this will do your job.
cheers
vicky
0 件の賞賛
メッセージ3/10
6,698件の閲覧回数
If you only want to display a text file you can load it and use a string indicator inside Labview. So your user will never have to deal with notepad.exe (as he can access the menu of notepad anyway...).
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ4/10
6,694件の閲覧回数
Hi

I am not able to open the txt file, my text file is palced
at the path mentioned below "C:\Documents and Settings\raghavendra\Desktop\report.txt".

if i pass the above mentioned path to the command line argument in systemexec.vi
it generates error.

i have no problem opening "notepad.exe".....but iwant the report.txt to
be opened when i open notepad.

thanks

rags
0 件の賞賛
メッセージ5/10
6,689件の閲覧回数
Hello Rags,

you're not able to open the report? Why? Can notepad open the text file? Can Labview open the textfile?
Why do you want to display the text using notepad?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ6/10
6,680件の閲覧回数
Hi,
Your command should be .... notepad.exe "C:\Documents and Settings\raghavendra\Desktop\report.txt" ... not only the path,try this it shall work.
cheers
vicky
0 件の賞賛
メッセージ7/10
6,675件の閲覧回数
hi Gerd

see the requirement is from the client...so i have to make sure the
txt file is opened when notepad is launched......


i am getting error if pass this at command line argument "C:\Documents and Settings\raghavendra\Desktop\report.txt"

do you havae any idea GRED!

rags
0 件の賞賛
メッセージ8/10
6,673件の閲覧回数
Hello rags,

what vicky says works, for me even without the quotation marks...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ9/10
6,670件の閲覧回数
HI vicky....

Thanks a LOtttttttttttttttttttt
its working..and thanks once again


rags
0 件の賞賛
メッセージ10/10
6,669件の閲覧回数