<?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: Passing values back from called macros back to parent ob in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145662#M27252</link>
    <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;Take a look at the GDL Reference under the CALL function and specifically the RETURNED PARAMETERS keyword (pgs 222-223). You can return whatever you want to the calling macro.&lt;/BLOCKQUOTE&gt;

Thanks Matthew,&lt;BR /&gt;
I hadn't noticed that one.&lt;BR /&gt;
&lt;BR /&gt;
After a quick look at it there appears to be one small problem though.&lt;BR /&gt;
It does not appear to be live.&lt;BR /&gt;
For example object A calls object B which does a calculation based on the rotation angle of object A.&lt;BR /&gt;
&lt;BR /&gt;
If object A rotation = 0 then orient = "E"&lt;BR /&gt;
If object A rotation = 90 then orient = "N"&lt;BR /&gt;
If object A rotation = 180 then orient = "W"&lt;BR /&gt;
If object A rotation = 270 then orient = "S"&lt;BR /&gt;
&lt;BR /&gt;
The RETURNED_PARAMETER orient is set in object A which is good.&lt;BR /&gt;
However if you rotate object A on screen (2D or 3D) the parameter does not alter even after a rebuild and regenerate.&lt;BR /&gt;
You physically have to select the object (inividually if there is more than one) and open the object settings before the new orientaion is re-set.&lt;BR /&gt;
&lt;BR /&gt;
I have zipped up a couple of very simple objects to show what I mean.&lt;BR /&gt;
Load both in your library and place object A and rotate it to see what I mean.&lt;BR /&gt;
&lt;BR /&gt;
And this is pretty much exactly the issue I am having.&lt;BR /&gt;
All my doors and windows are calling a macro that sorts out the orientation of the frame.&lt;BR /&gt;
I was sending this to a GLOB_USER variable but that seems not to work in 12 which is why I am looking for an alternate solution.&lt;BR /&gt;
The RETURNED_PARAMETER is close to what I need but there would be problems if people simply rotate walls with frames in.&lt;BR /&gt;
&lt;BR /&gt;
I will keep searching for a solution.&lt;BR /&gt;
Thanks for your help.&lt;BR /&gt;
Barry.</description>
    <pubDate>Tue, 19 Aug 2008 04:30:32 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2008-08-19T04:30:32Z</dc:date>
    <item>
      <title>Passing values back from called macros back to parent object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145660#M27250</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I'm looking for a way to have a called macro calculate a value for a string parameter and then pass that value back to the parent object.&lt;BR /&gt;
&lt;BR /&gt;
Up till now I have always used a GLOB_USER variable.&lt;BR /&gt;
The macro sets the GLOB_USER and the the object reads that value.&lt;BR /&gt;
&lt;BR /&gt;
But there seems to be a bug in 12 that does not recognize a text string GLOB_USER value when the object is viewed in 3D. (I have reported this bug to Graphisoft).&lt;BR /&gt;
&lt;BR /&gt;
2D is fine but 3D doesn't seem to work.&lt;BR /&gt;
&lt;BR /&gt;
PUT and GET works great for numerical values but not for string values.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
So I am looking for a way to get a string value calculated in a macro to be available for use in the parent object.&lt;BR /&gt;
Any ideas please let me know.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For those interested in trying a simple experiment to prove my point (and I hope I am not making a complete fool out of myself &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_rolleyes.gif" style="display : inline;" /&gt; ).&lt;BR /&gt;
&lt;BR /&gt;
Create a new object.&lt;BR /&gt;
In the master script write - &lt;BR /&gt;
&lt;BR /&gt;
GLOB_USER_17 = "xyz"&lt;BR /&gt;
&lt;BR /&gt;
In the 2D script write - &lt;BR /&gt;
PRINT GLOB_USER_17&lt;BR /&gt;
&lt;BR /&gt;
In the 3D script write - &lt;BR /&gt;
PRINT GLOB_USER_17&lt;BR /&gt;
&lt;BR /&gt;
Now view the 2D and a message will appear showing "xyz".&lt;BR /&gt;
The same will happen when you view the 3D view.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now create another new object.&lt;BR /&gt;
Nothing in the master script.&lt;BR /&gt;
&lt;BR /&gt;
In the 2D script write - &lt;BR /&gt;
PRINT GLOB_USER_17&lt;BR /&gt;
&lt;BR /&gt;
In the 3D script write - &lt;BR /&gt;
PRINT GLOB_USER_17&lt;BR /&gt;
&lt;BR /&gt;
Now view the 2D and a message will appear showing "xyz".&lt;BR /&gt;
&lt;BR /&gt;
Open the 3D view and the message window will be blank (I hope otherwise I am going mad).&lt;BR /&gt;
&lt;BR /&gt;
It all works fine in previous versions.&lt;BR /&gt;
&lt;BR /&gt;
Barry.&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 May 2023 10:00:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145660#M27250</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-05-24T10:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Passing values back from called macros back to parent ob</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145661#M27251</link>
      <description>Take a look at the GDL Reference under the CALL function and specifically the RETURNED PARAMETERS keyword (pgs 222-223). You can return whatever you want to the calling macro.</description>
      <pubDate>Fri, 15 Aug 2008 19:07:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145661#M27251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-15T19:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing values back from called macros back to parent ob</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145662#M27252</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;Take a look at the GDL Reference under the CALL function and specifically the RETURNED PARAMETERS keyword (pgs 222-223). You can return whatever you want to the calling macro.&lt;/BLOCKQUOTE&gt;

Thanks Matthew,&lt;BR /&gt;
I hadn't noticed that one.&lt;BR /&gt;
&lt;BR /&gt;
After a quick look at it there appears to be one small problem though.&lt;BR /&gt;
It does not appear to be live.&lt;BR /&gt;
For example object A calls object B which does a calculation based on the rotation angle of object A.&lt;BR /&gt;
&lt;BR /&gt;
If object A rotation = 0 then orient = "E"&lt;BR /&gt;
If object A rotation = 90 then orient = "N"&lt;BR /&gt;
If object A rotation = 180 then orient = "W"&lt;BR /&gt;
If object A rotation = 270 then orient = "S"&lt;BR /&gt;
&lt;BR /&gt;
The RETURNED_PARAMETER orient is set in object A which is good.&lt;BR /&gt;
However if you rotate object A on screen (2D or 3D) the parameter does not alter even after a rebuild and regenerate.&lt;BR /&gt;
You physically have to select the object (inividually if there is more than one) and open the object settings before the new orientaion is re-set.&lt;BR /&gt;
&lt;BR /&gt;
I have zipped up a couple of very simple objects to show what I mean.&lt;BR /&gt;
Load both in your library and place object A and rotate it to see what I mean.&lt;BR /&gt;
&lt;BR /&gt;
And this is pretty much exactly the issue I am having.&lt;BR /&gt;
All my doors and windows are calling a macro that sorts out the orientation of the frame.&lt;BR /&gt;
I was sending this to a GLOB_USER variable but that seems not to work in 12 which is why I am looking for an alternate solution.&lt;BR /&gt;
The RETURNED_PARAMETER is close to what I need but there would be problems if people simply rotate walls with frames in.&lt;BR /&gt;
&lt;BR /&gt;
I will keep searching for a solution.&lt;BR /&gt;
Thanks for your help.&lt;BR /&gt;
Barry.</description>
      <pubDate>Tue, 19 Aug 2008 04:30:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Passing-values-back-from-called-macros-back-to-parent-object/m-p/145662#M27252</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2008-08-19T04:30:32Z</dc:date>
    </item>
  </channel>
</rss>

