<?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: Stretch object from center in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382674#M313</link>
    <description>&lt;P&gt;You need to use a intermediate parameter which is half of your overall width. You then associate your hotspots to this parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;IF GLOB_MODPAR_NAME = "B" then
	A = 2 * B
	PARAMETERS A = A
endIF

IF GLOB_MODPAR_NAME = "A" then
	B = A/2
	PARAMETERS B = B
endIF

HOTSPOT2	0,		0,	unID,	B,	1		:	unID = unID + 1
HOTSPOT2	-A/2,	0,	unID,	B,	2,	A	:	unID = unID + 1
HOTSPOT2	A,		0,	unID,	B,	3		:	unID = unID + 1

HOTSPOT2	0,		0,	unID,	B,	1		:	unID = unID + 1
HOTSPOT2	A/2,	0,	unID,	B,	2,	A	:	unID = unID + 1
HOTSPOT2	-A/2,	0,	unID,	B,	3		:	unID = unID + 1

LINE2		-A/2,	0,	A/2,	0
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ps. Did not see object.&lt;/P&gt;
&lt;P&gt;pss. Ah, you have basically done the same thing. You just need another&amp;nbsp;&lt;STRONG&gt;GLOB_MODPAR_NAME&lt;/STRONG&gt; for when you edit&amp;nbsp;&lt;EM&gt;Length&lt;/EM&gt;. THOUGH, I do not think you should be defining your hotspot positions using your intermediate parameter as that may cause issues down the line if you have other variables that modifiy&amp;nbsp;&lt;EM&gt;Length&amp;nbsp;&lt;/EM&gt;as those actions will not proc&amp;nbsp;&lt;STRONG&gt;GLOB_MODPAR_NAME&amp;nbsp;&lt;/STRONG&gt;given they are not direct intervention.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 02:43:11 GMT</pubDate>
    <dc:creator>Lingwisyer</dc:creator>
    <dc:date>2023-06-08T02:43:11Z</dc:date>
    <item>
      <title>Stretch object from center</title>
      <link>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382568#M312</link>
      <description>&lt;P&gt;Does anybody knows is it possible to combine object stretching "ways" when object's origin located at center, not on the edge?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. HS align to any element that already is placed. To do so additional parameter and IF statement in Parameter script was added.&lt;/P&gt;
&lt;P&gt;2. Drag HS and manually enter value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems like each path exclude other. Ideally 2nd one would work, but unfortunately HS can't be align properly to others element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="object " href="https://drive.google.com/file/d/1Ij5-YFqcdMvniD3tZpp7GcR3mIYrIXyj/view?usp=drivesdk" target="_self"&gt;object &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 10:15:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382568#M312</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2023-06-07T10:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Stretch object from center</title>
      <link>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382674#M313</link>
      <description>&lt;P&gt;You need to use a intermediate parameter which is half of your overall width. You then associate your hotspots to this parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;IF GLOB_MODPAR_NAME = "B" then
	A = 2 * B
	PARAMETERS A = A
endIF

IF GLOB_MODPAR_NAME = "A" then
	B = A/2
	PARAMETERS B = B
endIF

HOTSPOT2	0,		0,	unID,	B,	1		:	unID = unID + 1
HOTSPOT2	-A/2,	0,	unID,	B,	2,	A	:	unID = unID + 1
HOTSPOT2	A,		0,	unID,	B,	3		:	unID = unID + 1

HOTSPOT2	0,		0,	unID,	B,	1		:	unID = unID + 1
HOTSPOT2	A/2,	0,	unID,	B,	2,	A	:	unID = unID + 1
HOTSPOT2	-A/2,	0,	unID,	B,	3		:	unID = unID + 1

LINE2		-A/2,	0,	A/2,	0
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ps. Did not see object.&lt;/P&gt;
&lt;P&gt;pss. Ah, you have basically done the same thing. You just need another&amp;nbsp;&lt;STRONG&gt;GLOB_MODPAR_NAME&lt;/STRONG&gt; for when you edit&amp;nbsp;&lt;EM&gt;Length&lt;/EM&gt;. THOUGH, I do not think you should be defining your hotspot positions using your intermediate parameter as that may cause issues down the line if you have other variables that modifiy&amp;nbsp;&lt;EM&gt;Length&amp;nbsp;&lt;/EM&gt;as those actions will not proc&amp;nbsp;&lt;STRONG&gt;GLOB_MODPAR_NAME&amp;nbsp;&lt;/STRONG&gt;given they are not direct intervention.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 02:43:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382674#M313</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2023-06-08T02:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Stretch object from center</title>
      <link>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382680#M314</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Good point, it was not wise to use intermediate parameter for defying HS position.&lt;/P&gt;
&lt;P&gt;TBH I haven't wrote another condition (for changing intermediate parameter if original is changed), because i thought that would alter HS position, but not object length when entering distance value manually&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 06:02:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Stretch-object-from-center/m-p/382680#M314</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2023-06-08T06:02:16Z</dc:date>
    </item>
  </channel>
</rss>

