<?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: Simulate the ON_ERROR command??? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91624#M39280</link>
    <description>Thanks again Laszlo,&lt;BR /&gt;
&lt;BR /&gt;
I understood that it couldn't be done... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mad.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
The file not found error stops the entire program... I'll make something different to avoid this problem...&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Also, your first line should be &lt;BR /&gt;
&lt;BR /&gt;
h="c:\win\doc\test.txt" &lt;BR /&gt;
&lt;BR /&gt;
and not &lt;BR /&gt;
&lt;BR /&gt;
h:"c:\win\doc\test.txt" 
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
of course... digitation error... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt; &lt;BR /&gt;

&lt;BLOCKQUOTE&gt;As I can see in the GDL Help, not equal can be shown by both &amp;lt;&amp;gt; and #.&lt;/BLOCKQUOTE&gt;

Right...&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot.&lt;BR /&gt;
Marco</description>
    <pubDate>Fri, 07 Jan 2005 17:07:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-01-07T17:07:56Z</dc:date>
    <item>
      <title>Simulate the ON_ERROR command???</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91620#M39276</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi all,&lt;BR /&gt;
&lt;BR /&gt;
as described onto GDL CB3 by David N.C., the ON_ERROR command is not present in GDL...&lt;BR /&gt;
&lt;BR /&gt;
So, is there a way to emulate that command...???&lt;BR /&gt;
&lt;BR /&gt;
It's useful when, for example, the path of a file called by the "OPEN" command is wrong, without Archicad pops up tha dialog that says: "File not found...: "path" "&lt;BR /&gt;
Instead of this dialog I would like to open a pop-up that says: "Error, the file you requested is not present on the server... Check the network state!"&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
Marco&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 Jan 2005 08:33:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91620#M39276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-07T08:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Simulate the ON_ERROR command???</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91621#M39277</link>
      <description>When opening a file, the OPEN command always returns a value.&lt;BR /&gt;
If you have the following:&lt;BR /&gt;
&lt;BR /&gt;
ch1 = OPEN ("DATA", "file1", "SEPARATOR=';', MODE = RO", DIALOG)&lt;BR /&gt;
&lt;BR /&gt;
after this line in the Script, you can query the value of ch1 to see if the open operation was successful or not. The GDL Manual has the details on its values.</description>
      <pubDate>Fri, 07 Jan 2005 12:43:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91621#M39277</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2005-01-07T12:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Simulate the ON_ERROR command???</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91622#M39278</link>
      <description>Thank you laszlo,&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;ch1 = OPEN ("DATA", "file1", "SEPARATOR=';', MODE = RO", DIALOG)&lt;/BLOCKQUOTE&gt;

using FULLPATH instead of DIALOG, the parser does not visualize a dialog, and uses directly the given string as path of the file... if ch1 is different from 1 there is a problem and the operation was unsuccessful... so I could use:&lt;BR /&gt;
&lt;BR /&gt;
IF ch1#1 THEN PRINT "Error!"&lt;BR /&gt;
&lt;BR /&gt;
but this comes after the standard error dialog and my IF statement could not be processed.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
h:"c:\win\doc\test.txt"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ch=OPEN ("TEXT", h, "FULLPATH")&lt;BR /&gt;
&lt;BR /&gt;
!*******&lt;BR /&gt;
&lt;BR /&gt;
IF ch#1 THEN&lt;BR /&gt;
	PRINT "DANGER! I'm unable to find the file on the server!"&lt;BR /&gt;
	EXIT&lt;BR /&gt;
ENDIF&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Using this code, the parser stops at line !******* and can't process my IF statement.&lt;BR /&gt;
&lt;BR /&gt;
Have you any idea, please?&lt;BR /&gt;
I'm writing anything wrong?&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
Marco</description>
      <pubDate>Fri, 07 Jan 2005 15:45:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91622#M39278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-07T15:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Simulate the ON_ERROR command???</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91623#M39279</link>
      <description>I don't know if you can make the program display your error message after the program's error message, but I can help you display the Dialog:&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#0051ff"&gt;h="c:\win\doc\test.txt"&lt;BR /&gt;
&lt;BR /&gt;
ch=OPEN ("TEXT", h, "DIALOG, FULLPATH")&lt;BR /&gt;
&lt;BR /&gt;
!*******&lt;BR /&gt;
&lt;BR /&gt;
IF ch&amp;lt;&amp;gt;1 THEN&lt;BR /&gt;
PRINT "DANGER! I'm unable to find the file on the server!"&lt;BR /&gt;
EXIT&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;/FONT&gt;&lt;BR /&gt;
As you can see "DIALOG, FULLPATH" is the parameter string with two values within it. The parameter string is between quation marks. If it has more then one value, the values are separated by commas.&lt;BR /&gt;
&lt;BR /&gt;
Also, your first line should be &lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#0036ff"&gt;h="c:\win\doc\test.txt"&lt;BR /&gt;
&lt;/FONT&gt;&lt;BR /&gt;
and not &lt;BR /&gt;
&lt;FONT color="#0048ff"&gt;&lt;BR /&gt;
h:"c:\win\doc\test.txt"&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
As I can see in the GDL Help, &lt;B&gt;not equal &lt;/B&gt;can be shown by both &lt;B&gt;&amp;lt;&amp;gt; &lt;/B&gt;and &lt;B&gt;#&lt;/B&gt;.</description>
      <pubDate>Fri, 07 Jan 2005 16:51:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91623#M39279</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2005-01-07T16:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Simulate the ON_ERROR command???</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91624#M39280</link>
      <description>Thanks again Laszlo,&lt;BR /&gt;
&lt;BR /&gt;
I understood that it couldn't be done... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mad.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
The file not found error stops the entire program... I'll make something different to avoid this problem...&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Also, your first line should be &lt;BR /&gt;
&lt;BR /&gt;
h="c:\win\doc\test.txt" &lt;BR /&gt;
&lt;BR /&gt;
and not &lt;BR /&gt;
&lt;BR /&gt;
h:"c:\win\doc\test.txt" 
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
of course... digitation error... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt; &lt;BR /&gt;

&lt;BLOCKQUOTE&gt;As I can see in the GDL Help, not equal can be shown by both &amp;lt;&amp;gt; and #.&lt;/BLOCKQUOTE&gt;

Right...&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot.&lt;BR /&gt;
Marco</description>
      <pubDate>Fri, 07 Jan 2005 17:07:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91624#M39280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-07T17:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simulate the ON_ERROR command???</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91625#M39281</link>
      <description>You are welcome.&lt;BR /&gt;
Hope you can get around these limitations.&lt;BR /&gt;
Otherwise you can do some great stuff with these GDL I/O operations.&lt;BR /&gt;
Worth exploring.</description>
      <pubDate>Mon, 10 Jan 2005 11:42:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Simulate-the-ON-ERROR-command/m-p/91625#M39281</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2005-01-10T11:42:41Z</dc:date>
    </item>
  </channel>
</rss>

