<?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: Adjustable Hotspot Help?! in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286967#M5624</link>
    <description>I can't say exactly what causes your geometry to fail, so let me give you a simple example that accomplishes what you're trying to do.&lt;BR /&gt;
Try this sample 2D script and see if this approach would work for you:
&lt;PRE&gt;hotspot2 0, 0, 1001, half, 1
hotspot2 half, 0, 1002, half, 2
hotspot2 -1, 0, 1003, half, 3

A=half*2 ![edit] you don't really need this line, see below

line2 -A/2, 0, A/2, 0
hotspot2 -A/2, 0&lt;/PRE&gt;

Now, this sample script defines length of line by its half length. To get the overall length updated in the dialog box you may use the following Parameter script:
&lt;PRE&gt;parameters A=half*2
lock "A"&lt;/PRE&gt;

Now, say you want to alternate between being able to define the length BOTH by "A" and "half", I suggest you program a switch, make your calculations conditional (IF... THEN), and let the user choose. ArchiCAD will not let you alternate between them in a continuous loop.</description>
    <pubDate>Wed, 24 May 2017 17:47:24 GMT</pubDate>
    <dc:creator>matjashka</dc:creator>
    <dc:date>2017-05-24T17:47:24Z</dc:date>
    <item>
      <title>Adjustable Hotspot Help?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286964#M5621</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi, &lt;BR /&gt;
&lt;BR /&gt;
I am trying to add a hotspot to be able to adjust the width of my object.&lt;BR /&gt;
&lt;BR /&gt;
 HSID=1&lt;BR /&gt;
 HSID = HSID+1&lt;BR /&gt;
 HOTSPOT 0, 0, blind_length,HSID+1, track_length, 1+128 &lt;BR /&gt;
 HSID = HSID+1 &lt;BR /&gt;
 HOTSPOT -1, 0, 0, HSID+1, track_length, 3        &lt;BR /&gt;
 HSID = HSID+1 &lt;BR /&gt;
 HOTSPOT track_length/2, 0, blind_length ,HSID+1, track_length, 2    &lt;BR /&gt;
&lt;BR /&gt;
This is the script.&lt;BR /&gt;
&lt;BR /&gt;
The problem I am getting is that the dimensions only start changing after I move the hotspot 50% further than the end of the object. Can't seem to work it out.&lt;BR /&gt;
IF anyone can help THEN it would be much appreciated. The object is coded so that 0, 0 is in the centre of the object. so -track_length/2 is actually accurate to the edge of the object. &lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 May 2017 14:43:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286964#M5621</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2017-05-24T14:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adjustable Hotspot Help?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286965#M5622</link>
      <description>JGoode,&lt;BR /&gt;
&lt;BR /&gt;
The problem with your code is that you are placing your hotstpot at &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;track_length/2&lt;E&gt;&lt;/E&gt; but trying to modify &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;track_length&lt;E&gt;&lt;/E&gt; parameter.&lt;BR /&gt;
Make sure that the position of the hotspot actually corresponds with the dimension you're editing.</description>
      <pubDate>Wed, 24 May 2017 15:16:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286965#M5622</guid>
      <dc:creator>matjashka</dc:creator>
      <dc:date>2017-05-24T15:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adjustable Hotspot Help?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286966#M5623</link>
      <description>&lt;BLOCKQUOTE&gt;matjashka wrote:&lt;BR /&gt;JGoode,&lt;BR /&gt;
&lt;BR /&gt;
The problem with your code is that you are placing your hotstpot at &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;track_length/2&lt;E&gt;&lt;/E&gt; but trying to modify &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;track_length&lt;E&gt;&lt;/E&gt; parameter.&lt;BR /&gt;
Make sure that the position of the hotspot actually corresponds with the dimension you're editing.&lt;/BLOCKQUOTE&gt;

track_length/2 is on the end point of my object, as I said, 0, 0 is in the centre of the object. I have no issues with the height or depth but I cannot solve the width.</description>
      <pubDate>Wed, 24 May 2017 15:18:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286966#M5623</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2017-05-24T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adjustable Hotspot Help?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286967#M5624</link>
      <description>I can't say exactly what causes your geometry to fail, so let me give you a simple example that accomplishes what you're trying to do.&lt;BR /&gt;
Try this sample 2D script and see if this approach would work for you:
&lt;PRE&gt;hotspot2 0, 0, 1001, half, 1
hotspot2 half, 0, 1002, half, 2
hotspot2 -1, 0, 1003, half, 3

A=half*2 ![edit] you don't really need this line, see below

line2 -A/2, 0, A/2, 0
hotspot2 -A/2, 0&lt;/PRE&gt;

Now, this sample script defines length of line by its half length. To get the overall length updated in the dialog box you may use the following Parameter script:
&lt;PRE&gt;parameters A=half*2
lock "A"&lt;/PRE&gt;

Now, say you want to alternate between being able to define the length BOTH by "A" and "half", I suggest you program a switch, make your calculations conditional (IF... THEN), and let the user choose. ArchiCAD will not let you alternate between them in a continuous loop.</description>
      <pubDate>Wed, 24 May 2017 17:47:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286967#M5624</guid>
      <dc:creator>matjashka</dc:creator>
      <dc:date>2017-05-24T17:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adjustable Hotspot Help?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286968#M5625</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
This might work, not tested.&lt;BR /&gt;
&lt;BR /&gt;
HSID=0&lt;BR /&gt;
ADD -track_length/2, 0, blind_length&lt;BR /&gt;
HOTSPOT 0, 0, 0,HSID+1, track_length, 1+128&lt;BR /&gt;
HOTSPOT -1, 0, 0, HSID+2, track_length, 3&lt;BR /&gt;
HOTSPOT track_length, 0, 0 ,HSID+3, track_length, 2&lt;BR /&gt;
DEL 1&lt;BR /&gt;
HSID=HSID+3</description>
      <pubDate>Wed, 24 May 2017 18:00:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adjustable-Hotspot-Help/m-p/286968#M5625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T18:00:35Z</dc:date>
    </item>
  </channel>
</rss>

