<?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: Text File (database) INPUT/READ for a calculating object in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211537#M17109</link>
    <description>Hi Joachim,&lt;BR /&gt;
Thanks - I did something very similar,&lt;BR /&gt;
you can see in my newest plea for more help - LOL!&lt;BR /&gt;
&lt;E&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
Gil</description>
    <pubDate>Wed, 11 May 2011 09:23:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-05-11T09:23:50Z</dc:date>
    <item>
      <title>Text File (database) INPUT/READ for a calculating object (?)</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211532#M17104</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi All!&lt;BR /&gt;
OK, I give up - &lt;BR /&gt;
FILE I/O is driving me nuts!&lt;BR /&gt;
Attached is a sample text file that was generated by a simple&lt;BR /&gt;
LIST scheme.&lt;BR /&gt;
It lists certain attributes of given objects that are placed on the plan view&lt;BR /&gt;
of a story, with discreet layers and IDs set to each object.&lt;BR /&gt;
&lt;BR /&gt;
My goal is to create a "Calculating and Report" object that will be&lt;BR /&gt;
able to READ this file, perform certain summing and subtracting&lt;BR /&gt;
operations and generate a 2D "Report Object".&lt;BR /&gt;
&lt;BR /&gt;
Let me explain what you are looking at:&lt;BR /&gt;
GF is the Ground Floor story, in this case all objects are on it.&lt;BR /&gt;
|XX| are the various layers.&lt;BR /&gt;
I would need to generate a graphic list of all objects on layer |01|,&lt;BR /&gt;
sorted by ID (next field from the layer), display the math routine&lt;BR /&gt;
per object, display the result of each routine, and then display&lt;BR /&gt;
the SUM of results for all these routines.&lt;BR /&gt;
&lt;BR /&gt;
I know this should be achievable via TEXT or DATA file INPUT or READ,&lt;BR /&gt;
and should use Arrays in some way with a counter loop,&lt;BR /&gt;
but besides looping my CPU up to 57% I am going nowhere...&lt;BR /&gt;
and this is with Cookbook 2, GDL reference manual and Andy Watson's&lt;BR /&gt;
GDL Handbook.&lt;BR /&gt;
&lt;BR /&gt;
If anyone out there has the time to explain this at idiot-speak level,&lt;BR /&gt;
it would be much appreciated and you would be blessed with good fortune,&lt;BR /&gt;
many children and a happy wife!!!&lt;BR /&gt;
&lt;BR /&gt;
&lt;E&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
Gil&lt;/R&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/68001i7E9E05F9CF609D57/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Database2.jpg" title="Database2.jpg" /&gt;</description>
      <pubDate>Sun, 08 May 2011 23:41:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211532#M17104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-08T23:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Text File (database) INPUT/READ for a calculating object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211533#M17105</link>
      <description>PS: Take note that the combination of Story, Layer &amp;amp; ID form&lt;BR /&gt;
a very discreet triple power ID for each row in the file -&lt;BR /&gt;
which is the key to making this data useful...&lt;BR /&gt;
&lt;E&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/E&gt;</description>
      <pubDate>Sun, 08 May 2011 23:47:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211533#M17105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-08T23:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Text File (database) INPUT/READ for a calculating object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211534#M17106</link>
      <description>Try this part of script, which I did not tested, but I think it should work:&lt;BR /&gt;
&lt;BR /&gt;
DIM mti[][5]	!Array for storing the values of the text file&lt;BR /&gt;
&lt;BR /&gt;
ix=0&lt;BR /&gt;
ch01 = OPEN("TEXT","C:\GDL\DATA\Database2.txt","SEPARATOR='|',MODE=RO,FULLPATH")&lt;BR /&gt;
	DO &lt;BR /&gt;
		ix=ix+1  				!ix is the variable linecounter, 5 columns are given&lt;BR /&gt;
		n=input(ch01, ix, 1, 	mti[ix][1],  mti[ix][2],  mti[ix][3],  mti[ix][4],  mti[ix][5])		&lt;BR /&gt;
	WHILE n&amp;gt;-1&lt;BR /&gt;
close ch01&lt;BR /&gt;
&lt;BR /&gt;
manu=ix-1						!number of Array lines with content</description>
      <pubDate>Mon, 09 May 2011 06:32:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211534#M17106</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2011-05-09T06:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Text File (database) INPUT/READ for a calculating object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211535#M17107</link>
      <description>Hi Joachim,&lt;BR /&gt;
I managed to get things working, sort of.&lt;BR /&gt;
&lt;BR /&gt;
How can I get an array to store something like the&lt;BR /&gt;
following string, which appears on th 4th column of the source file&lt;BR /&gt;
((  1.00+  0.00) /2) *  1.00&lt;BR /&gt;
as text? (brackets, spaces, operators etc - all as a text string)?&lt;BR /&gt;
&lt;BR /&gt;
I tried setting the variable to text, directly (var1=abc)&lt;BR /&gt;
and also via the parameters - but I keep getting "1" as a result.&lt;BR /&gt;
&lt;BR /&gt;
???&lt;BR /&gt;
&lt;BR /&gt;
&lt;E&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
Gil</description>
      <pubDate>Tue, 10 May 2011 19:14:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211535#M17107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-10T19:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Text File (database) INPUT/READ for a calculating object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211536#M17108</link>
      <description>With that script I get as result 0.5 , which is the correct calculation, and not 1.&lt;BR /&gt;
If you want to have the formula, you must write in the textfile &lt;BR /&gt;
"(( 1.00+ 0.00) /2) * 1.00"&lt;BR /&gt;
with quotes.&lt;BR /&gt;
In the gsm you must then delete the quotes with a string-operation.</description>
      <pubDate>Wed, 11 May 2011 06:35:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211536#M17108</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2011-05-11T06:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Text File (database) INPUT/READ for a calculating object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211537#M17109</link>
      <description>Hi Joachim,&lt;BR /&gt;
Thanks - I did something very similar,&lt;BR /&gt;
you can see in my newest plea for more help - LOL!&lt;BR /&gt;
&lt;E&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
Gil</description>
      <pubDate>Wed, 11 May 2011 09:23:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-File-database-INPUT-READ-for-a-calculating-object/m-p/211537#M17109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-11T09:23:50Z</dc:date>
    </item>
  </channel>
</rss>

