<?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 Outputting to a txt. file in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Outputting-to-a-txt-file/m-p/24221#M31199</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I'm nearly finished building my GDL object, and to finish it off I want to output information about the object to a txt. file eg: length, description of individual parts in the object, their quantity, so i can send this to Access to work out a final price of the job. The script works fine for one GDL object but if I add another one the initial information sent to the txt file is overwritten by the next object.&lt;BR /&gt;
How do I rescript it so that this wont happen, at the minute I am exporting individual files to Access when instead it would be easier and quicker to just send 1.&lt;BR /&gt;
This is part my script:&lt;BR /&gt;
&lt;BR /&gt;
Executive script:&lt;BR /&gt;
IF outdat THEN GOSUB 900: !File I/O&lt;BR /&gt;
END&lt;BR /&gt;
!----------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
900: ! File OUTPUT Routine&lt;BR /&gt;
&lt;BR /&gt;
!Write  Costings Access Report File&lt;BR /&gt;
ch1= OPEN("TEXT", acost+".txt","SEPARATOR='\t',MODE=WO")&lt;BR /&gt;
&lt;BR /&gt;
OUTPUT ch1, 1,0, "Description","Qty","Length","Type","Qty per Length","Cost/Unit","Cost","Weight (kg/m)","Weight/Unit (kg)","Total Weight (kg)"&lt;BR /&gt;
&lt;BR /&gt;
OUTPUT ch1, 1,0, "Ball",nosections," ",ball*1000," ",F1,F1*(nosections),spherew,spherew,spherew*nosections&lt;BR /&gt;
&lt;BR /&gt;
Close ch1&lt;BR /&gt;
&lt;BR /&gt;
In parameters I tpye in the what name I want to call the file and this is related to: acost&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Apr 2007 12:50:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-04-05T12:50:14Z</dc:date>
    <item>
      <title>Outputting to a txt. file</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Outputting-to-a-txt-file/m-p/24221#M31199</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I'm nearly finished building my GDL object, and to finish it off I want to output information about the object to a txt. file eg: length, description of individual parts in the object, their quantity, so i can send this to Access to work out a final price of the job. The script works fine for one GDL object but if I add another one the initial information sent to the txt file is overwritten by the next object.&lt;BR /&gt;
How do I rescript it so that this wont happen, at the minute I am exporting individual files to Access when instead it would be easier and quicker to just send 1.&lt;BR /&gt;
This is part my script:&lt;BR /&gt;
&lt;BR /&gt;
Executive script:&lt;BR /&gt;
IF outdat THEN GOSUB 900: !File I/O&lt;BR /&gt;
END&lt;BR /&gt;
!----------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
900: ! File OUTPUT Routine&lt;BR /&gt;
&lt;BR /&gt;
!Write  Costings Access Report File&lt;BR /&gt;
ch1= OPEN("TEXT", acost+".txt","SEPARATOR='\t',MODE=WO")&lt;BR /&gt;
&lt;BR /&gt;
OUTPUT ch1, 1,0, "Description","Qty","Length","Type","Qty per Length","Cost/Unit","Cost","Weight (kg/m)","Weight/Unit (kg)","Total Weight (kg)"&lt;BR /&gt;
&lt;BR /&gt;
OUTPUT ch1, 1,0, "Ball",nosections," ",ball*1000," ",F1,F1*(nosections),spherew,spherew,spherew*nosections&lt;BR /&gt;
&lt;BR /&gt;
Close ch1&lt;BR /&gt;
&lt;BR /&gt;
In parameters I tpye in the what name I want to call the file and this is related to: acost&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Apr 2007 12:50:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Outputting-to-a-txt-file/m-p/24221#M31199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-05T12:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Outputting to a txt. file</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Outputting-to-a-txt-file/m-p/24222#M31200</link>
      <description>&lt;BLOCKQUOTE&gt;Robert1083 wrote:&lt;BR /&gt;
ch1= OPEN("TEXT", acost+".txt","SEPARATOR='\t',MODE=WO")&lt;/BLOCKQUOTE&gt;

MODE = WO overwrites the existing file&lt;BR /&gt;
&lt;BR /&gt;
MODE = WA appends to the existing file&lt;BR /&gt;
&lt;BR /&gt;
There may be quite a bit more to get this to work for you though, depending on just precisely what you want to do. Clearly you don't want to keep appending more and more data forever. The simplest thing might be to set the database to clear the contents when it reads the file. &lt;BR /&gt;
&lt;BR /&gt;
Managing data through intermediary text files can be troublesome though. You might do better to use the interactive scheduler to extract the data for you.</description>
      <pubDate>Sun, 08 Apr 2007 15:03:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Outputting-to-a-txt-file/m-p/24222#M31200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-08T15:03:51Z</dc:date>
    </item>
  </channel>
</rss>

