<?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: Interconnected Parameters a=b and b=a in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/624948#M6944</link>
    <description>&lt;P&gt;If you look at the section titled "Connections between parameters" on this page it should explain how to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gdl.graphisoft.com/gdl-basics/parameter-logic" target="_blank"&gt;https://gdl.graphisoft.com/gdl-basics/parameter-logic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've not tried it myself, but it looks as though you check the value of&amp;nbsp;&lt;SPAN&gt;GLOB_MODPAR_NAME to see which parameter is being changed and act accordingly.&amp;nbsp; This prevents it getting into a circular loop.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2024 13:26:00 GMT</pubDate>
    <dc:creator>neilmcallister</dc:creator>
    <dc:date>2024-08-21T13:26:00Z</dc:date>
    <item>
      <title>Interconnected Parameters a=b and b=a</title>
      <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/624462#M6943</link>
      <description>&lt;P&gt;Hi gdl wizards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anybody help create (Parameter) script that will adjust the values in a way that if parameter "xx" changes then parameter "f1" will change accordingly - and then if paramter "f1" changes parameter "xx" will update accordingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know how to do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;f1=ATN(xx)
PARAMETERS f1=f1

xx=TAN(f1)
PARAMETERS xx=xx&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in this case "f1" becomes locked!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need both parameters to be able to control the other one, at any given time!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope the information is sufficient enough ‌‌&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 22:50:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/624462#M6943</guid>
      <dc:creator>Thomas Nymann</dc:creator>
      <dc:date>2024-08-25T22:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Interconnected Parameters a=b and b=a</title>
      <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/624948#M6944</link>
      <description>&lt;P&gt;If you look at the section titled "Connections between parameters" on this page it should explain how to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gdl.graphisoft.com/gdl-basics/parameter-logic" target="_blank"&gt;https://gdl.graphisoft.com/gdl-basics/parameter-logic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've not tried it myself, but it looks as though you check the value of&amp;nbsp;&lt;SPAN&gt;GLOB_MODPAR_NAME to see which parameter is being changed and act accordingly.&amp;nbsp; This prevents it getting into a circular loop.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 13:26:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/624948#M6944</guid>
      <dc:creator>neilmcallister</dc:creator>
      <dc:date>2024-08-21T13:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Interconnected Parameters a=b and b=a</title>
      <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/627338#M6945</link>
      <description>&lt;LI-CODE lang="markup"&gt;IF GLOB_MODPAR_NAME = "A" then
B = xA
PARAMETERS B = B
endIF

IF GLOB_MODPAR_NAME = "B" then
A = B/x
PARAMETERS A = A
endIF&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Aug 2024 01:22:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/627338#M6945</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2024-08-22T01:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Interconnected Parameters a=b and b=a</title>
      <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/627339#M6946</link>
      <description>&lt;P&gt;Yes GLOB_MODPAR_NAME is your friend here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would not use ...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if GLOB_MODPAR_NAME = "xx" then
	f1 = xx * 2
	parameters f1 = f1
else
	xx = f1 / 2
	parameters xx = xx
endif&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will work but means if 'xx' is modified,' f1' will update, but if any other parameter is changed 'xx' will be updated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want that and only want 'xx' to update when 'f1' is changed then just use separate routines ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if GLOB_MODPAR_NAME = "xx" then
	f1 = xx * 2
	parameters f1 = f1
endif

if GLOB_MODPAR_NAME = "f1" then
	xx = f1 / 2
	parameters xx = xx
endif&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 01:21:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/627339#M6946</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2024-08-22T01:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Interconnected Parameters a=b and b=a</title>
      <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/628786#M6955</link>
      <description>&lt;P&gt;Thanks Barry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That did the trick. Much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 06:26:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/628786#M6955</guid>
      <dc:creator>Thomas Nymann</dc:creator>
      <dc:date>2024-08-27T06:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Interconnected Parameters a=b and b=a</title>
      <link>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/628788#M6956</link>
      <description>&lt;P&gt;Thanks for that fast reply Lingwisyer. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 06:27:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Interconnected-Parameters-a-b-and-b-a/m-p/628788#M6956</guid>
      <dc:creator>Thomas Nymann</dc:creator>
      <dc:date>2024-08-27T06:27:08Z</dc:date>
    </item>
  </channel>
</rss>

