<?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: Object resize by A or B parameter in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666883#M7808</link>
    <description>&lt;P&gt;Fantastic! thank you both very much.&lt;BR /&gt;&lt;BR /&gt;The range with extra parameters for set area and minimum dimension would resolve a couple of objects for me.&lt;/P&gt;</description>
    <pubDate>Sun, 22 Jun 2025 23:38:23 GMT</pubDate>
    <dc:creator>MitchD</dc:creator>
    <dc:date>2025-06-22T23:38:23Z</dc:date>
    <item>
      <title>Object resize by A or B parameter</title>
      <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666472#M7801</link>
      <description>&lt;P&gt;I have a very simple script for a 2D object that creates a box with minimum dimension 1m, and total area of 3m².&lt;BR /&gt;&lt;BR /&gt;it functions fine except it only seems to accept changes to the A parameter, where ideally i want both A and B to be defined (mainly so you can adjust any hotspot)&lt;BR /&gt;&lt;BR /&gt;the parameters section is as below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF A &amp;lt; 1.0 THEN A = 1.0
PARAMETERS A = A
IF B &amp;lt; 1.0 THEN B = 1.0
PARAMETERS B = B
PARAMETERS B = 3/A&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;i've even tried changing the code to this, but didn't affect anything.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF a &amp;lt; 1.0 then a = 1.0
IF b &amp;lt; 1.0 then b = 1.0

if glob_modpar_name = "a" then
        b = a / 3
        parameters b = b
endif
if glob_modpar_name = "b" then
        a = b / 3
        parameters a = a
endif&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;is there a more suitable code to allow either parameters to resize the object?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 05:38:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666472#M7801</guid>
      <dc:creator>MitchD</dc:creator>
      <dc:date>2025-06-19T05:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Object resize by A or B parameter</title>
      <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666503#M7802</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;if glob_modpar_name = "A" then
if A &amp;lt; 1.0 then A = 1.0
if A &amp;gt; 3.0 then A = 3.0 ! Area should be 3m2 so A should be &amp;lt; 3

B = 3.0 / A ! Calculate value of B

goto 1:
endif

if glob_modpar_name = "B" then
if B &amp;lt; 1.0 then B = 1.0
if B &amp;gt; 3.0 then B = 3.0! Area should be 3m2 so B should be &amp;lt; 3

A = 3.0 / B ! Calculate value of A
endif

1:
parameters A = A , B = B ! Set the values of A and B&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Jun 2025 17:25:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666503#M7802</guid>
      <dc:creator>BrunoH</dc:creator>
      <dc:date>2025-06-21T17:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Object resize by A or B parameter</title>
      <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666511#M7804</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUES "A" RANGE [1.0,]
VALUES "B" RANGE [1.0,]

if GLOB_MODPAR_NAME = "A" then
	B = 3.0/A
	if B &amp;lt; 1.0 then
		B = 1.0
		A = 3.0
	endif
endif
if GLOB_MODPAR_NAME = "B" then
	A = 3.0/B
	if A &amp;lt; 1.0 then
		A = 1.0
		B = 3.0
	endif
endif

PARAMETERS A = A, B = B&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 09:09:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666511#M7804</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-06-19T09:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Object resize by A or B parameter</title>
      <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666631#M7805</link>
      <description>&lt;P&gt;Cap the ranges to 3 given the set area with min dimension.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 01:36:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666631#M7805</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2025-06-20T01:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Object resize by A or B parameter</title>
      <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666635#M7806</link>
      <description>&lt;P&gt;Yes, you could do that as well seeing as the maximum size would be 3m.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then it could be simply ...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUES "A" RANGE [1.0,3.0]
VALUES "B" RANGE [1.0,3.0]

if GLOB_MODPAR_NAME = "A" then
	B = 3.0/A
endif
if GLOB_MODPAR_NAME = "B" then
	A = 3.0/B
endif

PARAMETERS A = A, B = B&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also create a parameter for the area, if you want an adjustable maximum area.&lt;/P&gt;
&lt;P&gt;Then just place that parameter everywhere you see 3.0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 01:47:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666635#M7806</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-06-20T01:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Object resize by A or B parameter</title>
      <link>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666883#M7808</link>
      <description>&lt;P&gt;Fantastic! thank you both very much.&lt;BR /&gt;&lt;BR /&gt;The range with extra parameters for set area and minimum dimension would resolve a couple of objects for me.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jun 2025 23:38:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Object-resize-by-A-or-B-parameter/m-p/666883#M7808</guid>
      <dc:creator>MitchD</dc:creator>
      <dc:date>2025-06-22T23:38:23Z</dc:date>
    </item>
  </channel>
</rss>

