<?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: How to hange A &amp;amp; B values of object with an IF script? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660318#M7623</link>
    <description>&lt;P&gt;Hi Barry,&lt;/P&gt;
&lt;P&gt;I tested it too, but every rect2 is always 1.00/1.00 and not of the A and B size..... !?&lt;/P&gt;
&lt;P&gt;With Lock "A" and "B"... doesn't matter.....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_00.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86191i03D2C3F6C5C6100C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_00.png" alt="Value_IF_ENDIF_00.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_01.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86192i6B26EFB305750138/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_01.png" alt="Value_IF_ENDIF_01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_02.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86193i925475E441306E8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_02.png" alt="Value_IF_ENDIF_02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_03.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86194i229AFE990099E60F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_03.png" alt="Value_IF_ENDIF_03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2025 11:23:53 GMT</pubDate>
    <dc:creator>Andreas81ch</dc:creator>
    <dc:date>2025-04-23T11:23:53Z</dc:date>
    <item>
      <title>How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660302#M7620</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;This might be a simple question, but I've not been able to find anything that helps me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like is quite simple - make A and B have different preset values that can be toggled.&lt;BR /&gt;&lt;BR /&gt;Say I want to make a rectangle, but I want it to have preset dimensions selectable from a list. In my head it should work like this, but it doesn't. Any suggestion would be welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;2D&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Rect2 0,0,A,B&lt;BR /&gt;&lt;BR /&gt;END&lt;/PRE&gt;&lt;PRE&gt;&lt;STRONG&gt;PARAMETERS:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;VALUES "size" "min", "medium", "max"&lt;BR /&gt;&lt;BR /&gt;IF "size" = "min" THEN&lt;BR /&gt;PARAMETERS A=2&lt;BR /&gt;PARAMETERS B=2*2&lt;BR /&gt;ENDIF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;IF "size" = "medium" THEN&lt;BR /&gt;PARAMETERS A=3&lt;BR /&gt;PARAMETERS B=3*3&lt;BR /&gt;ENDIF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;IF "size" = "max" THEN&lt;BR /&gt;PARAMETERS A=5&lt;BR /&gt;PARAMETERS B=5*5&lt;BR /&gt;ENDIF&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 10:47:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660302#M7620</guid>
      <dc:creator>Bilkins</dc:creator>
      <dc:date>2025-04-23T10:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660305#M7621</link>
      <description>&lt;P&gt;First I would ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOCK "A", "B"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So they can not be changed by the user.&lt;/P&gt;
&lt;P&gt;Then in your parameter script you should always set the value of the parameter first and then set the actual parameter.&lt;/P&gt;
&lt;P&gt;So ...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF "size" = "min" THEN
A=2
B=2*2
PARAMETERS A=A, B=B
ENDIF&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 11:02:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660305#M7621</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-04-23T11:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660312#M7622</link>
      <description>&lt;P&gt;Hi Barry,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. That doesn't affect the A or B values, they are still 1000 like default.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 11:20:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660312#M7622</guid>
      <dc:creator>Bilkins</dc:creator>
      <dc:date>2025-04-23T11:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660318#M7623</link>
      <description>&lt;P&gt;Hi Barry,&lt;/P&gt;
&lt;P&gt;I tested it too, but every rect2 is always 1.00/1.00 and not of the A and B size..... !?&lt;/P&gt;
&lt;P&gt;With Lock "A" and "B"... doesn't matter.....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_00.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86191i03D2C3F6C5C6100C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_00.png" alt="Value_IF_ENDIF_00.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_01.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86192i6B26EFB305750138/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_01.png" alt="Value_IF_ENDIF_01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_02.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86193i925475E441306E8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_02.png" alt="Value_IF_ENDIF_02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Value_IF_ENDIF_03.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/86194i229AFE990099E60F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Value_IF_ENDIF_03.png" alt="Value_IF_ENDIF_03.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 11:23:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660318#M7623</guid>
      <dc:creator>Andreas81ch</dc:creator>
      <dc:date>2025-04-23T11:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660323#M7624</link>
      <description>&lt;P&gt;Sorry, I just copied &amp;amp; pasted your script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should be &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF size = "min" THEN
A=2
B=2*2
PARAMETERS A=A, B=B
ENDIF&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without the quotes around the size variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 11:34:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660323#M7624</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-04-23T11:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660324#M7625</link>
      <description>&lt;P&gt;And something like that ?:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUES "size" "min", "max"

LOCK "A", "B"

IF GLOB_MODPAR_NAME ="size" and size = "min" THEN
A=2
B=2*2
PARAMETERS A=A, B=B
ENDIF

IF GLOB_MODPAR_NAME ="size" and size = "max" THEN
A=5
B=5*5
PARAMETERS A=A, B=B
ENDIF&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Apr 2025 11:38:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660324#M7625</guid>
      <dc:creator>Mathias Jonathan</dc:creator>
      <dc:date>2025-04-23T11:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660416#M7626</link>
      <description>&lt;P&gt;What does a&amp;nbsp;&lt;EM&gt;VALUES&lt;/EM&gt;{2} command do when used with&amp;nbsp;&lt;STRONG&gt;A&lt;/STRONG&gt; or&amp;nbsp;&lt;STRONG&gt;B&lt;/STRONG&gt;? I have never tried it with any of the 3 base dimensions. You could then have a dropdown that tells you your values for each option without needing to open the settings dialogue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 01:47:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660416#M7626</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2025-04-24T01:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660574#M7630</link>
      <description>&lt;P&gt;Thanks for the reply to both you and &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7331"&gt;@Barry Kelly&lt;/a&gt; !&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can't believe it was something as simple as unnecessary quote marks breaking the script, but I'll take heart that I at least was on the right track.&lt;BR /&gt;&lt;BR /&gt;What's the added benefit of adding this to the script?&lt;/P&gt;&lt;PRE&gt;IF GLOB_MODPAR_NAME ="size" and size = "max" THEN&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 07:07:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660574#M7630</guid>
      <dc:creator>Bilkins</dc:creator>
      <dc:date>2025-04-25T07:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to hange A &amp; B values of object with an IF script?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660604#M7632</link>
      <description>&lt;P&gt;Good suggestion, that is actually more suitable for my intended use (parking space object with different A &amp;amp; B dimensions based on a variety of parameters).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This script works:&lt;/P&gt;&lt;PRE&gt;VALUES{2} "size" 2.0, "min", &lt;BR /&gt;5.0, "max"&lt;BR /&gt;&lt;BR /&gt;VALUES{2} "width" size*2, "minwidth", &lt;BR /&gt;size*5, "maxwidth"&lt;BR /&gt;&lt;BR /&gt;LOCK "A", "B"&lt;BR /&gt;&lt;BR /&gt;A=size&lt;BR /&gt;B=width&lt;BR /&gt;PARAMETERS A=A, B=B&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;But I would ideally like VALUES{2] for B to be governed by VALUES{2] of the A-dimension. I'm not sure if that is possible? I can't seem to find the right parameter types to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;VALUES{2} "size" 2.0, "min", &lt;BR /&gt;5.0, "max"&lt;BR /&gt;&lt;BR /&gt;VALUES{2} "width" size*2, "minwidth", &lt;BR /&gt;size*5, "maxwidth"&lt;BR /&gt;&lt;BR /&gt;LOCK "A", "B"&lt;BR /&gt;&lt;BR /&gt;IF size= "max" THEN &lt;BR /&gt;width = "maxwidth"&lt;BR /&gt;ELSE&lt;BR /&gt;width = "minwidth"&lt;BR /&gt;ENDIF&lt;BR /&gt;&lt;BR /&gt;A=size&lt;BR /&gt;B=width&lt;BR /&gt;PARAMETERS A=A, B=B&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 10:05:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-to-hange-A-amp-B-values-of-object-with-an-IF-script/m-p/660604#M7632</guid>
      <dc:creator>Bilkins</dc:creator>
      <dc:date>2025-04-25T10:05:20Z</dc:date>
    </item>
  </channel>
</rss>

