<?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 macro and parameters all in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284506#M3671</link>
    <description>Hi Manuel&lt;BR /&gt;
&lt;BR /&gt;
Maybe the value of alpha was modified in the caller script. So its actual value has to be passed with
&lt;PRE&gt;alpha = alpha&lt;/PRE&gt;

In this situation the first "alpha" is a variable and the second "alpha" is the name of the parameter in the called macro.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if you don't do that the original value will be passed to the macro:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;!parameter list:
!alpha = 90

!masterscript:
alpha = 270

!2d-script:
call "macroname" parameters all ! &amp;lt;= alpha in macro = 90
call "macroname" parameters all alpha = alpha ! &amp;lt;= alpha in macro = 270
&lt;/PRE&gt;

HTH Dominic</description>
    <pubDate>Thu, 01 Oct 2020 12:09:29 GMT</pubDate>
    <dc:creator>Dominic Wyss</dc:creator>
    <dc:date>2020-10-01T12:09:29Z</dc:date>
    <item>
      <title>Call macro and parameters all</title>
      <link>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284505#M3670</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;I try to understand macros. Some elements from Graphisoft include this part of the script.&lt;BR /&gt;
&lt;PRE&gt;call "macro",
parameters all alpha = alpha&lt;/PRE&gt;
Why do I need "alpha = alpha", when the name of the variable is the same in the caller object and in the macro? &lt;BR /&gt;&lt;BR /&gt;Thanks for your support.&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 07:44:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284505#M3670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-15T07:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Call macro and parameters all</title>
      <link>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284506#M3671</link>
      <description>Hi Manuel&lt;BR /&gt;
&lt;BR /&gt;
Maybe the value of alpha was modified in the caller script. So its actual value has to be passed with
&lt;PRE&gt;alpha = alpha&lt;/PRE&gt;

In this situation the first "alpha" is a variable and the second "alpha" is the name of the parameter in the called macro.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if you don't do that the original value will be passed to the macro:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;!parameter list:
!alpha = 90

!masterscript:
alpha = 270

!2d-script:
call "macroname" parameters all ! &amp;lt;= alpha in macro = 90
call "macroname" parameters all alpha = alpha ! &amp;lt;= alpha in macro = 270
&lt;/PRE&gt;

HTH Dominic</description>
      <pubDate>Thu, 01 Oct 2020 12:09:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284506#M3671</guid>
      <dc:creator>Dominic Wyss</dc:creator>
      <dc:date>2020-10-01T12:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Call macro and parameters all</title>
      <link>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284507#M3672</link>
      <description>Hi Dominic,&lt;BR /&gt;
&lt;BR /&gt;
Can I use CALL from macro parameter become to other parameter in call object?&lt;BR /&gt;
Example: I want to call Resize_A_B macro (A, B parameter for resize) but in my object I want to resize difference parameters (e.g. width &amp;amp; height parameter)&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Thu, 01 Oct 2020 23:51:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284507#M3672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-01T23:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Call macro and parameters all</title>
      <link>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284508#M3673</link>
      <description>No, a macro can only change parameters (parameter script, hotspots) that the placeable object has, GDL doesn't have the concept of passing parameters by reference.</description>
      <pubDate>Tue, 06 Oct 2020 14:02:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284508#M3673</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2020-10-06T14:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Call macro and parameters all</title>
      <link>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284509#M3674</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;!parameter list:
!alpha = 90

!masterscript:
alpha = 270

!2d-script:
call "macroname" parameters all ! &amp;lt;= alpha in macro = 90
call "macroname" parameters all alpha = alpha ! &amp;lt;= alpha in macro = 270
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;

That's not the case, both calls will give alpha = 270 to the macro.&lt;BR /&gt;
Writing any &amp;lt;param&amp;gt; = &amp;lt;param&amp;gt; after all is just an emphasis.&lt;BR /&gt;
It has to be written only in case when the placeable object doesn't have a parameter that the macro has (when it's only a variable in the caller object).</description>
      <pubDate>Tue, 06 Oct 2020 14:14:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Call-macro-and-parameters-all/m-p/284509#M3674</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2020-10-06T14:14:22Z</dc:date>
    </item>
  </channel>
</rss>

