<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: executable will not write data to file in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/437030#M213938</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;This issue has been resolved! Thank you for all your help! Through your suggestions I have identified my problem.&lt;/P&gt;
&lt;P&gt;It turned out that some idiot locked up some paths on the laptop for security reasons making the root directory inaccessible.&lt;/P&gt;
&lt;P&gt;I have removed all file write restrictions and I am all set.&lt;/P&gt;
&lt;P&gt;Thanks Again very much!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2006 14:35:38 GMT</pubDate>
    <dc:creator>pmetcalf</dc:creator>
    <dc:date>2006-11-06T14:35:38Z</dc:date>
    <item>
      <title>executable will not write data to file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/434255#M212947</link>
      <description>&lt;DIV&gt;I created a Main&amp;nbsp;VI that calls a series of SubVIs, one of which reads a GPIB device and writes the data into a file in my root directory (c:\). The application works perfectly&lt;/DIV&gt;
&lt;DIV&gt;as the main VI calls subsequent VIs and each close upon completion of it's task. There are probably&amp;nbsp;8 Sub VI routines that run, But only one that writes my data file.&lt;/DIV&gt;
&lt;DIV&gt;Running this from the Labview 8 development system where the routines were created has been no problem and the data file ( which gets named automatically by the SubVI), contains date/time stamp, users initials, test specific parameters, and the GPIB read data. All as it should be.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Now! I created an executable of this application and it too works perfectly with the exception of the data file.&amp;nbsp;My application executable runs to completion as I would expect, but once the exe completes, My file is not in the root directory where my SubVI creates it and wirtes to it. As I said, this is only a problem in the executable version of my application.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Does anyone have any ideas why the file isn't getting created?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;BTW: I am getting no errors at runtime of&amp;nbsp;my exe.. Also I have searched the entire HD and the data text file simply is not there.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;HELP!!!!!!!!!!!&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Oct 2006 20:27:23 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/434255#M212947</guid>
      <dc:creator>pmetcalf</dc:creator>
      <dc:date>2006-10-30T20:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: executable will not write data to file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/434283#M212963</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;The most likely reason is that you're building the path to the file using the path of the VI. When building a VI into an EXE, the EXE is treated as a directory, so the VI path is c:\....exe\VINAME.vi. &lt;/P&gt;
&lt;P&gt;You can get around this by using a while loop to strip the path until you get a directory (using the File\Folder Info VI) or you can use the property Application.Kind to know whether you're running in LV or the exe and perform an extra strip. Placing a path indicator to see the actual path of the file should help you with this.&lt;/P&gt;
&lt;P&gt;If this didn't help you, I suggest you post your code.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2006 21:07:41 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/434283#M212963</guid>
      <dc:creator>tst</dc:creator>
      <dc:date>2006-10-30T21:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: executable will not write data to file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/434298#M212970</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Thank you for responding so quickly!&lt;/P&gt;
&lt;P&gt;I left out a couple of pieces of info that you may find important. I moved the exe file to a laptop for runtime operation. I thought that maybe this had something to do with it.&lt;/P&gt;
&lt;P&gt;I also have built a second utility that also&amp;nbsp;creates a file and dumps data into it. This app works ok as built. if you have any other suggestions, please post them.&lt;/P&gt;
&lt;P&gt;I will try&amp;nbsp;your suggestions as&amp;nbsp;I need to rebuild. But the code is rather large to&amp;nbsp; make too many alterations this late in my game.&lt;/P&gt;
&lt;P&gt;Thanks again for your help! It's greatly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2006 21:50:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/434298#M212970</guid>
      <dc:creator>pmetcalf</dc:creator>
      <dc:date>2006-10-30T21:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: executable will not write data to file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/435393#M213371</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I am still unable to resolve this issue. Please help!&lt;/P&gt;
&lt;P&gt;As suggested, I have added an indicator to display the filename and path to see if it is being created where I want it.&lt;/P&gt;
&lt;P&gt;The path is correct but my filenaming convention is not working as it did before build.&lt;/P&gt;
&lt;P&gt;Example: My SubVI takes field input to build the filename. i.e. a-1234 and concatenates with root directory (c:\) and .txt.&lt;/P&gt;
&lt;P&gt;Although the indicator displays only part of the filename unconcatenated. i.e. C:\a-123 and no extension, the partial filename and data never make it to&lt;/P&gt;
&lt;P&gt;the root directory.&lt;/P&gt;
&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2006 19:30:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/435393#M213371</guid>
      <dc:creator>pmetcalf</dc:creator>
      <dc:date>2006-11-01T19:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: executable will not write data to file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/435412#M213384</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;First, make the indicator big enough to display the entire path. I suspect that this may help you see the problem.&lt;/P&gt;
&lt;P&gt;Second, I suggest you use the Build Path VI instead of string concatenation.&lt;/P&gt;
&lt;P&gt;Third, if you're still having problems, add more debugging indicators. Build in the ability to single step through the code to be able to see where the problem occurs.&lt;/P&gt;
&lt;P&gt;If all this still doesn't help, at least upload an image of the code and what the FP with the debugging information looks like.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2006 19:47:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/435412#M213384</guid>
      <dc:creator>tst</dc:creator>
      <dc:date>2006-11-01T19:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: executable will not write data to file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/437030#M213938</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;This issue has been resolved! Thank you for all your help! Through your suggestions I have identified my problem.&lt;/P&gt;
&lt;P&gt;It turned out that some idiot locked up some paths on the laptop for security reasons making the root directory inaccessible.&lt;/P&gt;
&lt;P&gt;I have removed all file write restrictions and I am all set.&lt;/P&gt;
&lt;P&gt;Thanks Again very much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2006 14:35:38 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/executable-will-not-write-data-to-file/m-p/437030#M213938</guid>
      <dc:creator>pmetcalf</dc:creator>
      <dc:date>2006-11-06T14:35:38Z</dc:date>
    </item>
  </channel>
</rss>

