<?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: 'CALL' affecting scripts even within an IF statement not in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160675#M15703</link>
    <description>image #2:</description>
    <pubDate>Tue, 19 Jun 2012 17:12:28 GMT</pubDate>
    <dc:creator>Durval</dc:creator>
    <dc:date>2012-06-19T17:12:28Z</dc:date>
    <item>
      <title>'CALL' affecting scripts even within an IF statement not met</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160674#M15702</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Please help to solve a mystery. &lt;BR /&gt;
 &lt;BR /&gt;
This occurs with a custom window created in an old AC version (I think it was AC7). Now I'm trying to add some functionalities and update the window to AC15. &lt;BR /&gt;
The object has the following segment  in its 2D script: 
&lt;PRE&gt; 
IF condition THEN 
TEXT2 0, 0, "condition is met" 
!CALL "name_of_a_macro.gsm" 
ENDIF 
&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
This script produces the plan view in the attached image #1. &lt;BR /&gt;
Condition is not met, so there's no string printed in the plan. &lt;BR /&gt;
 &lt;BR /&gt;
If I change the script just by removing de '!'  before CALL command: 
&lt;PRE&gt; 
IF condition THEN 
TEXT2 0, 0, "condition is met" 
CALL "name_of_a_macro.gsm" 
ENDIF 
&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
The plan changes to the image #2. The condition is still not met, so there's no text printed, but, strangely, the CALL command, although inside the same IF statement (not met), is affecting the window's plan view. As you can see, the wallhole that windows usually create automatically is not working anymore. There is no WALLHOLE2 command in this script (actually there was one, but I commented it out for testing). &lt;BR /&gt;
 &lt;BR /&gt;
I'm going nuts to solve this. Any clues? &lt;BR /&gt;
 &lt;BR /&gt;
Thanks&lt;/R&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/71756iAD6BCACE5AE6ADD3/image-size/large?v=v2&amp;amp;px=999" border="0" alt="CALL_problem-#1.png" title="CALL_problem-#1.png" /&gt;</description>
      <pubDate>Wed, 24 May 2023 10:35:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160674#M15702</guid>
      <dc:creator>Durval</dc:creator>
      <dc:date>2023-05-24T10:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: 'CALL' affecting scripts even within an IF statement not</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160675#M15703</link>
      <description>image #2:</description>
      <pubDate>Tue, 19 Jun 2012 17:12:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160675#M15703</guid>
      <dc:creator>Durval</dc:creator>
      <dc:date>2012-06-19T17:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: 'CALL' affecting scripts even within an IF statement not</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160676#M15704</link>
      <description>How does your "WALLHOLE2" command relate to the called macro? Can you post that portion of your script?</description>
      <pubDate>Tue, 19 Jun 2012 18:56:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160676#M15704</guid>
      <dc:creator>Erika Epstein</dc:creator>
      <dc:date>2012-06-19T18:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: 'CALL' affecting scripts even within an IF statement not</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160677#M15705</link>
      <description>There was a WALLHOLE2 command in the script, but I removed it.&lt;BR /&gt;
The problem still remains.&lt;BR /&gt;
The object and the macro are attached below.&lt;BR /&gt;
It's a simple window. The macro adds 'cavity closure/turn plaster' functions (sort of...).</description>
      <pubDate>Tue, 19 Jun 2012 19:44:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160677#M15705</guid>
      <dc:creator>Durval</dc:creator>
      <dc:date>2012-06-19T19:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: 'CALL' affecting scripts even within an IF statement not</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160678#M15706</link>
      <description>I changed the macro that was CALLed, and the problem went away.&lt;BR /&gt;
So, it was related in someway with the original macro script.&lt;BR /&gt;
But what still puzzles me is why it is interfering (but not being fully executed) when the script should skip the CALL command...&lt;BR /&gt;
It seems that CALL is in some way overwriting the IF condition, looks like a bug.</description>
      <pubDate>Tue, 19 Jun 2012 21:21:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/CALL-affecting-scripts-even-within-an-IF-statement-not-met/m-p/160678#M15706</guid>
      <dc:creator>Durval</dc:creator>
      <dc:date>2012-06-19T21:21:21Z</dc:date>
    </item>
  </channel>
</rss>

