<?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: Return size of macro in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288802#M3734</link>
    <description>I think I know what you mean.&lt;BR /&gt;
Returning A &amp;amp; B will reset the values of A &amp;amp; B in your calling (parent) object.&lt;BR /&gt;
&lt;BR /&gt;
Why not add some parameters to the called macro for the chair_row_length = A and chair_row_width = B.&lt;BR /&gt;
Then return these new parameters and you can use them in the parent object without upsetting the A &amp;amp; B size.&lt;BR /&gt;
&lt;BR /&gt;
If that is not it then I misunderstand what you want.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
    <pubDate>Fri, 16 Oct 2020 01:19:36 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2020-10-16T01:19:36Z</dc:date>
    <item>
      <title>Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288801#M3733</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Anyone has a nice strategy to get the size of the macro you're calling?&lt;BR /&gt;This would be very handy.&lt;BR /&gt;E.g. row of chairs where you want to place them in distance.&lt;BR /&gt;Returning "A" and "B" doesn't work, sadly.&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 07:41:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288801#M3733</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-09-15T07:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288802#M3734</link>
      <description>I think I know what you mean.&lt;BR /&gt;
Returning A &amp;amp; B will reset the values of A &amp;amp; B in your calling (parent) object.&lt;BR /&gt;
&lt;BR /&gt;
Why not add some parameters to the called macro for the chair_row_length = A and chair_row_width = B.&lt;BR /&gt;
Then return these new parameters and you can use them in the parent object without upsetting the A &amp;amp; B size.&lt;BR /&gt;
&lt;BR /&gt;
If that is not it then I misunderstand what you want.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 16 Oct 2020 01:19:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288802#M3734</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2020-10-16T01:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288803#M3735</link>
      <description>No no, you're right, Barry.&lt;BR /&gt;
If &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;all&lt;E&gt;&lt;/E&gt; of the content is under your control then this is not an issue. My goal is different tho. I want that the user can use whatever they want, maybe even their own objects.&lt;BR /&gt;
This means an extra step for the end user and I think there should be some automation for it. Soooo an item for the wishlist...  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:05:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288803#M3735</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2020-10-16T13:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288804#M3736</link>
      <description>So your goal is to use the default sizes defined in the object that the user selects? This sounds dangerous, I wouldn't trust that the defaults don't change. This is outside our mechanism for migrating parameter values.&lt;BR /&gt;
I doubt it would be impactful enough to rework migration, maybe it's easier to solve your use case with Param-O.</description>
      <pubDate>Tue, 27 Oct 2020 10:42:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288804#M3736</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2020-10-27T10:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288805#M3737</link>
      <description>Thanks for chiming in, Peter.&lt;BR /&gt;
&lt;BR /&gt;
I can't really agree with your statement of it being dangerous, tho.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; &lt;BR /&gt;
Well, I certainly can guess why you'd think so.&lt;BR /&gt;
However this case is a bit different. As I said above and to be clear: I'm currently developing a kind of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;meta &lt;E&gt;&lt;/E&gt;object. Users can feed my object with other objects, most probably with ones &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;they made themself &lt;E&gt;&lt;/E&gt;(by just saving them from the floor plan, meaning they are &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;dumb&lt;E&gt;&lt;/E&gt; objects and will never change!).&lt;BR /&gt;
To make matters worse the meta object will call &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;different objects&lt;E&gt;&lt;/E&gt;, so &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;B&gt;one&lt;/B&gt;&lt;E&gt;&lt;/E&gt; distance &lt;B&gt;won't work&lt;/B&gt; for all, it's more complicated than just a simple multiplicating along an axis.&lt;BR /&gt;
That concludes why I really need to know the bounding box of a called macro, otherwise I don't know where to place the next object.&lt;BR /&gt;
&lt;BR /&gt;
Param-O won't help at all, by the way.</description>
      <pubDate>Wed, 28 Oct 2020 15:03:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288805#M3737</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2020-10-28T15:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288806#M3738</link>
      <description>&lt;BLOCKQUOTE&gt;runxel wrote:&lt;BR /&gt;
That concludes why I really need to know the bounding box of a called macro, otherwise I don't know where to place the next object.
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
I think I get what you are after.&lt;BR /&gt;
Just as we can CALL an object and send a parameter a new value (CALL object PARAMETERS A=value),&lt;BR /&gt;
You need to get a returned parameter value but assign it to another parameter in the parent object rather than the original parameter, so you need something like ... CALL object RETURNED parameter_x = A&lt;BR /&gt;
You don't want the returned value of A to affect the A parameter in your calling object.&lt;BR /&gt;
&lt;BR /&gt;
And as you are not the user necessarily creating the object being called, you have no control to add a parameter to collect the value you want.&lt;BR /&gt;
&lt;BR /&gt;
Is that the problem you are facing?&lt;BR /&gt;
&lt;BR /&gt;
What if in the parent object just before the CALL you save the parent's A value.&lt;BR /&gt;
&lt;BR /&gt;
A_original = A&lt;BR /&gt;
&lt;BR /&gt;
Then CALL the object and RETURN A&lt;BR /&gt;
This will reset the A in the parent object.&lt;BR /&gt;
Now you can save that value as a new parameter.&lt;BR /&gt;
&lt;BR /&gt;
new_parameter = A&lt;BR /&gt;
&lt;BR /&gt;
Then reset the A back to the original value.&lt;BR /&gt;
&lt;BR /&gt;
A = A_original&lt;BR /&gt;
PARAMETERS A = A&lt;BR /&gt;
&lt;BR /&gt;
You should have the 'new_parameter' value that you can use in your calculations.&lt;BR /&gt;
&lt;BR /&gt;
I think this should work, but I haven't tested.&lt;BR /&gt;
There may be a better way.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 29 Oct 2020 01:34:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288806#M3738</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2020-10-29T01:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288807#M3739</link>
      <description>Edit: I wrote nonsense here originally.&lt;BR /&gt;
A corrected version:&lt;BR /&gt;
&lt;BR /&gt;
What I totally missed:&lt;BR /&gt;
You can only return values you specified in an "END/EXIT" statement in the macro:
&lt;PRE&gt;end A, B&lt;/PRE&gt;

And now you can call the macro:
&lt;PRE&gt;call "my_macro", parameters a_nonsense_param_not_in_use = 0, returned_parameters any, name
&lt;/PRE&gt;
Only the order is crucial. You can assign the returned parameters to any values you'd like.&lt;BR /&gt;
&lt;BR /&gt;
So. to conclude: I have to tell the users, if they use their own objects that they need to open them and paste the end statement from above into their code.</description>
      <pubDate>Thu, 29 Oct 2020 14:06:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288807#M3739</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2020-10-29T14:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288808#M3740</link>
      <description>Hi folks,&lt;BR /&gt;
I think I am facing the same issue with &lt;A href="https://archicad-talk.graphisoft.com/viewtopic.php?f=49&amp;amp;t=70631&amp;amp;sid=e3522a29102a535b8bde087d6deb4716&amp;amp;start=30#p316799" target="_blank"&gt;this object&lt;/A&gt;.&lt;BR /&gt;
The object calls for another object that is basically a Mesh saved by the user.&lt;BR /&gt;
Archicad somehow mix the Mesh Hight and elevation into the zzyzx parameter.&lt;BR /&gt;
The result is that I simply can't get the exact elevation of the called object (which is used for a series of SEO operations).&lt;BR /&gt;
The only solution I came for now, is to save the Mesh at zero elevation.  Which is not acceptable for me.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_rolleyes.gif" style="display : inline;" /&gt; &lt;BR /&gt;
I tried the RETURNED_PARAMETERS (adding the zzyzx after the END).  It works, but it is also not acceptable for a user with no GDL knowledge.&lt;BR /&gt;
So...  As runxel suggested, this one goes to the GDL Wishlist.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt; &lt;BR /&gt;
I hope I am missing something.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 30 Oct 2020 09:22:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288808#M3740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-30T09:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288809#M3741</link>
      <description>@Braza: the origin of elements saved as GDL will be the user origin. Just put the origin at the right place before saving with Alt-Shift&lt;BR /&gt;
&lt;BR /&gt;
@runxel: you can omit a_nonsense_param_not_in_use: call "my_macro" parameters returned_parameters any</description>
      <pubDate>Wed, 04 Nov 2020 08:23:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288809#M3741</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2020-11-04T08:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288810#M3742</link>
      <description>@runxel: Sorry for hijacking your post.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mrgreen.gif" style="display : inline;" /&gt; &lt;BR /&gt;
@Peter: &lt;BR /&gt;
Thanks for the feedback Peter.&lt;BR /&gt;
The issue I described only happen if I the mesh is saved from the plan/2d view.  Saving from 3d works, but then I loose the 2d hotspots that the user can use to correctly place the object (and will be displayed in my object).  I inspected a series of objects (saved meshes with weird combinations of elevations, skirts[Mesh height] and node heights) and the only parameter that can correct the geometry elevation is the zzyzx.  Which, if I could retrieve, I could use to correct the elevation of the saved mesh object.</description>
      <pubDate>Wed, 04 Nov 2020 11:29:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288810#M3742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-04T11:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Return size of macro</title>
      <link>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288811#M3743</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;
you can omit a_nonsense_param_not_in_use: call "my_macro" parameters returned_parameters any
&lt;/BLOCKQUOTE&gt;

Nice! That was new to me, thanks!</description>
      <pubDate>Wed, 04 Nov 2020 12:43:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Return-size-of-macro/m-p/288811#M3743</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2020-11-04T12:43:21Z</dc:date>
    </item>
  </channel>
</rss>

