Sarah83 Posted November 4, 2004 Report Share Posted November 4, 2004 Hi! I like to open a spezial file (open visually, I would like to see the written text in the file). I created a file with a own path and I would like to open this file with a click on a button. I took "open/create/replace file.vi" and wired the path as a proberty node and a constant named "open", too. If I click the open file button it displays me a win dialog I should choose a file to open it. How could I open it "real"? Quote Link to comment
proximableu Posted November 4, 2004 Report Share Posted November 4, 2004 Can you specify little more, please? Quote Link to comment
Sarah83 Posted November 4, 2004 Author Report Share Posted November 4, 2004 Can you specify little more, please? 2554[/snapback] I saw, I need the "System Exec.vi" to open a file as I want. It seems that I must open notepad.exe. In the command line of this .vi I must write notepad.exe filename. OK ...but... in my case the filename is variable. See topic. I think it isn't possible ..... :headbang: Quote Link to comment
proximableu Posted November 4, 2004 Report Share Posted November 4, 2004 If you need to open file just for editing, in notepad, f.example, commandline vill be look like this : "notepad c:/mypath/myfile.txt" so, using concateate string, you can open every textfile you need.. If you want to open it in LabVIEW, you should use functions like "OpenFile" etc. While path calculations can be automated in many ways.. Say some more .. /Proximableu Quote Link to comment
FLX Posted November 4, 2004 Report Share Posted November 4, 2004 Hi!I like to open a spezial file (open visually, I would like to see the written text in the file). I created a file with a own path and I would like to open this file with a click on a button. I took "open/create/replace file.vi" and wired the path as a proberty node and a constant named "open", too. If I click the open file button it displays me a win dialog I should choose a file to open it. How could I open it "real"? 2552[/snapback] Hi, I could not see the image you attached. Have you checked the error cluster if an error is returned from the open create replace file.vi? Maybe the filepath is spelled wrong. If you do not want the advisory dialog you can disable this option at the VI. althoug more info would help to get to the core of our question. have fun LX Quote Link to comment
ahlers01 Posted November 4, 2004 Report Share Posted November 4, 2004 Hi!I like to open a spezial file (open visually, I would like to see the written text in the file). I created a file with a own path and I would like to open this file with a click on a button. I took "open/create/replace file.vi" and wired the path as a proberty node and a constant named "open", too. If I click the open file button it displays me a win dialog I should choose a file to open it. How could I open it "real"? 2552[/snapback] Why don't you do this way: Quote Link to comment
Sarah83 Posted November 5, 2004 Author Report Share Posted November 5, 2004 Why don't you do this way: 2560[/snapback] OK, now I try something like this. But so far I get a failure message: Failure 10 arisen at new file in serial test.... Possible reasons: LV: path doubly NI-488: New I/O expected with old I/O in gange. Quote Link to comment
malef Posted November 5, 2004 Report Share Posted November 5, 2004 2570[/snapback] Possible reason(s): LabVIEW: Duplicate path. --- NI-488: New I/O attempted with old I/O in progress. Sounds like file is not closed?! Manfred Quote Link to comment
malef Posted November 5, 2004 Report Share Posted November 5, 2004 Have a look at the Knwledge Base http://digital.ni.com/public.nsf/3efedde43...09?OpenDocument Manfred Quote Link to comment
Michael Aivaliotis Posted November 6, 2004 Report Share Posted November 6, 2004 OK, now I try something like this.But so far I get a failure message: Failure 10 arisen at new file in serial test.... Possible reasons: LV: path doubly NI-488: New I/O expected with old I/O in range. 2570[/snapback] The error is comming from another VI that is trying to write to the same file you are trying to read. When you use the "read characters from file.vi" it sets the read-only flag on the file. This means while you are reading the file, all other vi's accessing the file will give an error. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.