<?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: about calling macros in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112046#M32399</link>
    <description>Yes, in Archicad 10 you can have a Macro send a value back to the object that called it. I've not used it yet myself, but the syntax for the "CALL" statement is on page 218 of the GDL manual.
&lt;PRE&gt;CALL macro_name_string [,] PARAMETERS [name1=value1 , ... namen=valuen][[,] RETURNED_PARAMETERS r1, r2, ...] 
&lt;/PRE&gt;

and END/EXIT
&lt;PRE&gt;END / EXIT [v1, v2, ..., vn]&lt;/PRE&gt;
I have no idea what the difference is &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt; There are no examples in practice that I can find, or I could help more.&lt;BR /&gt;
&lt;BR /&gt;
I don't know of any way for a GDL object to pick up the names of objects in a directory.</description>
    <pubDate>Tue, 17 Oct 2006 17:40:52 GMT</pubDate>
    <dc:creator>TomWaltz</dc:creator>
    <dc:date>2006-10-17T17:40:52Z</dc:date>
    <item>
      <title>about calling macros</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112045#M32398</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I’m creating a railing GDL object. The railing calls different macros to use as balusters. Each baluster type has different structural dimensions. I’m planning to make many different balusters so I don’t want to change every time my main railing GDL code. So:&lt;BR /&gt;
&lt;BR /&gt;
a.	Is there a way each time I call a macro, the macro to “inform” the main railing GDL code about its structural dimensions? Now I use the master script and code such as – if balustertype = “baluster 01” then balusterwidth=……….- &lt;BR /&gt;
&lt;BR /&gt;
b.	In the parameter script is there a way to read and list macros from a particular directory instead of using -values “balustertype” ‘baluster 01’, ‘baluster 02’,…….-?&lt;BR /&gt;
&lt;BR /&gt;
thank you in advance  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_eek.gif" style="display : inline;" /&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2006 17:02:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112045#M32398</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-17T17:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: about calling macros</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112046#M32399</link>
      <description>Yes, in Archicad 10 you can have a Macro send a value back to the object that called it. I've not used it yet myself, but the syntax for the "CALL" statement is on page 218 of the GDL manual.
&lt;PRE&gt;CALL macro_name_string [,] PARAMETERS [name1=value1 , ... namen=valuen][[,] RETURNED_PARAMETERS r1, r2, ...] 
&lt;/PRE&gt;

and END/EXIT
&lt;PRE&gt;END / EXIT [v1, v2, ..., vn]&lt;/PRE&gt;
I have no idea what the difference is &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt; There are no examples in practice that I can find, or I could help more.&lt;BR /&gt;
&lt;BR /&gt;
I don't know of any way for a GDL object to pick up the names of objects in a directory.</description>
      <pubDate>Tue, 17 Oct 2006 17:40:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112046#M32399</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-17T17:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: about calling macros</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112047#M32400</link>
      <description>Toms idea is quiet well.&lt;BR /&gt;
&lt;BR /&gt;
After PARAMETERS  you can list all values, which should be set by the main object.&lt;BR /&gt;
&lt;BR /&gt;
After RETURNED_PARAMETERS you can add a list of variables of the main object, which will be filled after execution of the macro object by the values after END (of the macro-object!). Watch the order of variable names and values.&lt;BR /&gt;
&lt;BR /&gt;
You can call the macros as many times as you want. You can let them do different things depending of the context you call them. You can check this in the macro by GLOB_SCRIPT_TYPE and GLOB_CONTEXT. So if you call from master-script you could return just the values. If you call from 3D-script you could just "built" the baluster.&lt;BR /&gt;
&lt;BR /&gt;
There is a GDL-AddOn "GDL File Manager In-Out" to read file- and directory-names. But you have to open it by an existing pathname. AFAIK is there no way to request the actual path of an active library.</description>
      <pubDate>Tue, 17 Oct 2006 20:22:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/about-calling-macros/m-p/112047#M32400</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-10-17T20:22:54Z</dc:date>
    </item>
  </channel>
</rss>

