<?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: Lock or constraint A/B defaults? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230187#M3897</link>
    <description>Hi Mats,&lt;BR /&gt;
&lt;BR /&gt;
Is one of the values (a, b) the determining factor or do you want them both to be editable. If so do this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;parameters b = a*ratio
&lt;/PRE&gt;

if you want them both to be determining factors then you need to use the glob_modpar_name to determine which parameter is being edited, like this:&lt;BR /&gt;
lets first assume the ratio of a:b is 5:3 therefore&lt;BR /&gt;
aRatio = 5/3&lt;BR /&gt;
bRatio = 3/5 or 1/aRatio&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if glob_modpar_name = "a" then
        parameters b = a*(1/aRatio)
endif
if glob_modpar_name = "b" then
        parameters a = b*aRatio
endif
&lt;/PRE&gt;

Actually, to make sure the response is instantaneous you should establish the value in a local value before sending it to the actual parameter. So the script should read:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if glob_modpar_name = "a" then
        b = a*(1/aRatio)
        parameters b = b
endif
if glob_modpar_name = "b" then
        a = b*aRatio
        parameters a = a
endif
&lt;/PRE&gt;

Coding like this will make the object respond without having to refresh the parameters.</description>
    <pubDate>Thu, 10 Dec 2020 22:16:19 GMT</pubDate>
    <dc:creator>Kristian Bursell</dc:creator>
    <dc:date>2020-12-10T22:16:19Z</dc:date>
    <item>
      <title>Lock or constraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230184#M3894</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;LOCK ALL under paramters lock everything.&lt;BR /&gt;Say I want to lock only A size or constrint A/B size. Whaddoido?&lt;BR /&gt;&lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 07:26:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230184#M3894</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2021-09-15T07:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lock or contraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230185#M3895</link>
      <description>Does Lock "Parameter Name" not work for you?&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://gdl.graphisoft.com/reference-guide/the-parameter-script#LOCK_gdlcommand" target="_blank"&gt;&lt;LINK_TEXT text="http://gdl.graphisoft.com/reference-gui ... gdlcommand"&gt;http://gdl.graphisoft.com/reference-guide/the-parameter-script#LOCK_gdlcommand&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
You can also Hide the parameters so users can't enter different values.</description>
      <pubDate>Thu, 10 Dec 2020 10:40:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230185#M3895</guid>
      <dc:creator>DGSketcher</dc:creator>
      <dc:date>2020-12-10T10:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Lock or contraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230186#M3896</link>
      <description>&lt;BLOCKQUOTE&gt;DGSketcher wrote:&lt;BR /&gt;
Does Lock "Parameter Name" not work for you?&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://gdl.graphisoft.com/reference-guide/the-parameter-script#LOCK_gdlcommand" target="_blank"&gt;&lt;LINK_TEXT text="http://gdl.graphisoft.com/reference-gui ... gdlcommand"&gt;http://gdl.graphisoft.com/reference-guide/the-parameter-script#LOCK_gdlcommand&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
You can also Hide the parameters so users can't enter different values.
&lt;/BLOCKQUOTE&gt;

Haha...I'm so daft. I figured the quotation marks was just for "put your name here" since ALL was written without quotation marks. Then all isa fine but locking the A/B ratio...i e I want to be able to resize but not distort.</description>
      <pubDate>Thu, 10 Dec 2020 11:58:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230186#M3896</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2020-12-10T11:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Lock or constraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230187#M3897</link>
      <description>Hi Mats,&lt;BR /&gt;
&lt;BR /&gt;
Is one of the values (a, b) the determining factor or do you want them both to be editable. If so do this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;parameters b = a*ratio
&lt;/PRE&gt;

if you want them both to be determining factors then you need to use the glob_modpar_name to determine which parameter is being edited, like this:&lt;BR /&gt;
lets first assume the ratio of a:b is 5:3 therefore&lt;BR /&gt;
aRatio = 5/3&lt;BR /&gt;
bRatio = 3/5 or 1/aRatio&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if glob_modpar_name = "a" then
        parameters b = a*(1/aRatio)
endif
if glob_modpar_name = "b" then
        parameters a = b*aRatio
endif
&lt;/PRE&gt;

Actually, to make sure the response is instantaneous you should establish the value in a local value before sending it to the actual parameter. So the script should read:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if glob_modpar_name = "a" then
        b = a*(1/aRatio)
        parameters b = b
endif
if glob_modpar_name = "b" then
        a = b*aRatio
        parameters a = a
endif
&lt;/PRE&gt;

Coding like this will make the object respond without having to refresh the parameters.</description>
      <pubDate>Thu, 10 Dec 2020 22:16:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230187#M3897</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2020-12-10T22:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Lock or constraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230188#M3898</link>
      <description>&lt;BLOCKQUOTE&gt;Kristian wrote:&lt;BR /&gt;
Hi Mats,&lt;BR /&gt;
&lt;BR /&gt;
Is one of the values (a, b) the determining factor or do you want them both to be editable. If so do this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;parameters b = a*ratio
&lt;/PRE&gt;

if you want them both to be determining factors then you need to use the glob_modpar_name to determine which parameter is being edited, like this:&lt;BR /&gt;
lets first assume the ratio of a:b is 5:3 therefore&lt;BR /&gt;
aRatio = 5/3&lt;BR /&gt;
bRatio = 3/5 or 1/aRatio&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if glob_modpar_name = "a" then
        parameters b = a*(1/aRatio)
endif
if glob_modpar_name = "b" then
        parameters a = b*aRatio
endif
&lt;/PRE&gt;

Actually, to make sure the response is instantaneous you should establish the value in a local value before sending it to the actual parameter. So the script should read:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;if glob_modpar_name = "a" then
        b = a*(1/aRatio)
        parameters b = b
endif
if glob_modpar_name = "b" then
        a = b*aRatio
        parameters a = a
endif
&lt;/PRE&gt;

Coding like this will make the object respond without having to refresh the parameters.
&lt;/BLOCKQUOTE&gt;

Hi Kristian and thanks! I'll put that in my code. I should buy some hours of GDL-training from you. I dabble with softer stuff like a 2D (yeah...) like: &lt;IFRAME width="640" height="360" src="https://www.youtube.com/embed/axtEcoVxTPU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""&gt;&lt;/IFRAME&gt;  a 2D-tree symbol made only to look nice. I'm working on a 3D-tree and I will try to implement this 2D together with renovation filter control as well...</description>
      <pubDate>Fri, 11 Dec 2020 16:17:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230188#M3898</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2020-12-11T16:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lock or constraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230189#M3899</link>
      <description>That is a really nice looking 2D tree symbol.&lt;BR /&gt;
I'd be more than happy to give you some GDL training if there are specific things you want to learn. However, if you just have simple questions, like this topic, I am always happy to answer them free of charge.</description>
      <pubDate>Sun, 13 Dec 2020 22:16:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230189#M3899</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2020-12-13T22:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lock or constraint A/B defaults?</title>
      <link>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230190#M3900</link>
      <description>&lt;BLOCKQUOTE&gt;Kristian wrote:&lt;BR /&gt;
That is a really nice looking 2D tree symbol.&lt;BR /&gt;
I'd be more than happy to give you some GDL training if there are specific things you want to learn. However, if you just have simple questions, like this topic, I am always happy to answer them free of charge.
&lt;/BLOCKQUOTE&gt;

&lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 14 Dec 2020 07:14:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Lock-or-constraint-A-B-defaults/m-p/230190#M3900</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2020-12-14T07:14:37Z</dc:date>
    </item>
  </channel>
</rss>

