<?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: Working with TXT files and CUSTOM parameters in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282228#M4979</link>
    <description>&lt;BLOCKQUOTE&gt;jakubc7 wrote:&lt;BR /&gt;
I couldn't get GOTO "line number" to work
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
Make sure you have the correct syntax for the line number (number and colon).&lt;BR /&gt;

&lt;PRE&gt;GOTO 999999

!!other code here

999999:      !!skip to here&lt;/PRE&gt;

&lt;BR /&gt;
Barry.</description>
    <pubDate>Wed, 23 Sep 2020 03:11:25 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2020-09-23T03:11:25Z</dc:date>
    <item>
      <title>Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282225#M4976</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I have spent some time trying to get my object to read an external text file to draw it's parameter values.&lt;BR /&gt;I finally got it working and then went to add an option to have a CUSTOM parameters that user can input through the UI using A and B values.&lt;BR /&gt;&lt;BR /&gt;This seems much harder to achieve that I expected. Suddenly I realise that it's not that straight forward to write my custom values without using a text file.&lt;BR /&gt;&lt;BR /&gt;I tried to write something like this:&lt;BR /&gt;IF use_custom THEN&lt;BR /&gt;EXECUTE ALTERNATIVE CODE&lt;BR /&gt;END&lt;BR /&gt;ENDIF&lt;BR /&gt;&lt;BR /&gt;This kind of does the trick but now because I "END" the code prior to the object reading the remaining parameters, all my USER INTERFACE code is invalid and UI disappears when use_custom = 1&lt;BR /&gt;&lt;BR /&gt;Turn back use_custom = 0 and I'm good again.&lt;BR /&gt;&lt;BR /&gt;Can anyone suggest a way to do what I am trying to achieve ... I am not all that happy with my use_custom command so alternatives would be much appreciated.&lt;BR /&gt;&lt;BR /&gt;Object attached. Thanks for your help.&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 07:45:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282225#M4976</guid>
      <dc:creator>jakubc7</dc:creator>
      <dc:date>2021-09-15T07:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282226#M4977</link>
      <description>I haven't had a look at what you are doing, but if you don't want to END the script you can always ...&lt;BR /&gt;
&lt;BR /&gt;
GOTO 999999&lt;BR /&gt;
&lt;BR /&gt;
And then just add a line 999999 at the end of the script (or where ever you want it to jump to).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Tue, 22 Sep 2020 09:39:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282226#M4977</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2020-09-22T09:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282227#M4978</link>
      <description>Thanks Berry. I couldn't get GOTO "line number" to work but I did try the GOTO "SUB" to skip code. &lt;BR /&gt;
Turns out I had another issue which I managed to fix now.&lt;BR /&gt;
&lt;BR /&gt;
I would normally post my own resolution but it's nothing to do with my initial query so will give it a miss.&lt;BR /&gt;
Thanks for your help as always &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Wed, 23 Sep 2020 02:39:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282227#M4978</guid>
      <dc:creator>jakubc7</dc:creator>
      <dc:date>2020-09-23T02:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282228#M4979</link>
      <description>&lt;BLOCKQUOTE&gt;jakubc7 wrote:&lt;BR /&gt;
I couldn't get GOTO "line number" to work
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
Make sure you have the correct syntax for the line number (number and colon).&lt;BR /&gt;

&lt;PRE&gt;GOTO 999999

!!other code here

999999:      !!skip to here&lt;/PRE&gt;

&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 23 Sep 2020 03:11:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282228#M4979</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2020-09-23T03:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282229#M4980</link>
      <description>I see, makes sense.&lt;BR /&gt;
I thought you were literally specifying and jumping to a specific code line number.</description>
      <pubDate>Wed, 23 Sep 2020 03:23:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282229#M4980</guid>
      <dc:creator>jakubc7</dc:creator>
      <dc:date>2020-09-23T03:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282230#M4981</link>
      <description>GOto is essentially a GOsub without the ability to return</description>
      <pubDate>Fri, 25 Sep 2020 01:26:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282230#M4981</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2020-09-25T01:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282231#M4982</link>
      <description>The need for the goto is because an END statement in the master script blocks the running of other scripts too.&lt;BR /&gt;
Another important thing is that GDL subroutines aren't like functions in other languages: the subroutine name is just a label that &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;can&lt;E&gt;&lt;/E&gt; be jumped to, but it can execute without a gosub if a line-to-line execution reaches it. That's why in 2d/3d/etc scripts we have to write an END statement before the first subroutine. In a master script this has to be done differently:
&lt;PRE&gt;code
...
goto "masterEnd"

"subroutine":
    ! only executed with gosub, can be called from other scripts too
    ...
return

"masterEnd":
! last line of master script, execution continues in other scripts&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 07:26:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282231#M4982</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2020-09-28T07:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Working with TXT files and CUSTOM parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282232#M4983</link>
      <description>Thanks Peter. I never knew the difference between the 2 commands. Good to know that GOSUB can be called from other scripts!</description>
      <pubDate>Tue, 20 Oct 2020 00:33:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Working-with-TXT-files-and-CUSTOM-parameters/m-p/282232#M4983</guid>
      <dc:creator>jakubc7</dc:creator>
      <dc:date>2020-10-20T00:33:23Z</dc:date>
    </item>
  </channel>
</rss>

