LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open wordpad in labview

I would like know if it is possible to open wordpad in the Labview window.  I have tried that system_exec.vi option but it opens word pad outside Labview which is not want I want since I would like to open it again inside a Labview window.  I have tried Active X but i can't find the option for wordpad
 
Thanks
 
Reza Sed
0 Kudos
Message 1 of 5
(4,034 Views)

What do you need word pad for.  You can build this vary easily with a string control and write text to file, read text from file.  Is there a specific reason you need word pad?

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 5
(4,016 Views)
Hi Reza,

It sounds like you need to read files of "Rich Text Format."  I've tried and failed to make a set of VIs that read and write RTF files.  It's especially difficult because Microsoft's flavor of RTF seems a little different than other ones out there (maybe I'm wrong? I had a hard time getting it right before, though).  Here's a specification in case you ever want to try to parse it: http://support.microsoft.com/kb/86999

If there is an RTF parser for LabVIEW, I'm not aware of it.

If you're specifically dealing with some format specific to WordPad, then ActiveX or .net methods are probably your best bet.  (I know you've already tried ActiveX)
If you're dealing with plain text, then I agree with falkpl that all you need are the LabVIEW file IO and string functions.

I'm sorry if this didn't really help you, but I figured that it's better than nothing.  If it were me, I'd just call WordPad from the command line for lack of a better solution.

Good luck,

Jim
0 Kudos
Message 3 of 5
(4,002 Views)
Reza,

I think I might have found a solution for you.  If you have LabVIEW 8.0 or later, check under the .NET & ActiveX control palette for a control called "RichTextBox."  I hadn't really used this .NET object before today... Run the "LoadFile" method, wiring the path of your file to the invoke node.

I tried it out and it opened up my RTF file.  Keep in mind that if you close the reference to the object or stop execution you won't see your file.  (Keep the VI running with a loop)

If you have LabVIEW 7.1 or earlier, I'm not sure which ActiveX methods you'd have to use.

Jim
Message 4 of 5
(3,991 Views)

Thanks alot Jim

 

That's what I needed and it works great

 

Reza

0 Kudos
Message 5 of 5
(3,955 Views)