<?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 Hotspot &amp;quot;array&amp;quot; static hotspots in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596064#M6448</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list of hotspots that I thought could be cleaned up with an array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When implemented&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;unID = 1
HOTSPOT X1, 0, 0, unID, Len1, 1+128 :unID=unID+1 !Point
HOTSPOT X1, 0+Len1, 0, unID, Len1, 2 :unID=unID+1 !Move
HOTSPOT X1, 0-1, 0, -unID, Len1, 3 :unID=unID+1 !Ref&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;within a loop using an array, the hotspots all turn to static hotspots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code that works in the standard way (repeat for next 12 hotspots):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code using a loop that produces static hotspots instead of dynamic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;! Note, X[i] and Len[i] are declared arrays with defined values:
unID = 1
FOR i = 1 TO 12
HOTSPOT X[i], 0, 0, unID, Len[i], 1+128 :unID=unID+1 !Point
HOTSPOT X[i], 0+Len[i], 0, unID, Len[i], 2 :unID=unID+1 !Move
HOTSPOT X[i], 0-1, 0, -unID, Len[i], 3 :unID=unID+1 !Ref
Next i&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;What could be changed in the code to make the hotspots return to being dynamic within the loop?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Any help most welcome.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Many thanks, Matt&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 11:13:15 GMT</pubDate>
    <dc:creator>GDL Enthusiast</dc:creator>
    <dc:date>2024-09-26T11:13:15Z</dc:date>
    <item>
      <title>Hotspot "array" static hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596064#M6448</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list of hotspots that I thought could be cleaned up with an array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When implemented&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;unID = 1
HOTSPOT X1, 0, 0, unID, Len1, 1+128 :unID=unID+1 !Point
HOTSPOT X1, 0+Len1, 0, unID, Len1, 2 :unID=unID+1 !Move
HOTSPOT X1, 0-1, 0, -unID, Len1, 3 :unID=unID+1 !Ref&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;within a loop using an array, the hotspots all turn to static hotspots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code that works in the standard way (repeat for next 12 hotspots):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code using a loop that produces static hotspots instead of dynamic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;! Note, X[i] and Len[i] are declared arrays with defined values:
unID = 1
FOR i = 1 TO 12
HOTSPOT X[i], 0, 0, unID, Len[i], 1+128 :unID=unID+1 !Point
HOTSPOT X[i], 0+Len[i], 0, unID, Len[i], 2 :unID=unID+1 !Move
HOTSPOT X[i], 0-1, 0, -unID, Len[i], 3 :unID=unID+1 !Ref
Next i&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;What could be changed in the code to make the hotspots return to being dynamic within the loop?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Any help most welcome.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Many thanks, Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:13:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596064#M6448</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2024-09-26T11:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Hotspot "array" static hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596070#M6449</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi Matt.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I simplified a 2d sample of an array of lines, with varying length, using your variable.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;You can apply a similar concept out of this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt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lt;SPAN&gt;3&lt;/SPAN&gt; &lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;unID&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;unID&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt; &lt;SPAN&gt;!Ref&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;del&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&amp;nbsp;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;SPAN&gt; i&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ToperBarrientos_0-1711163573169.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/57805i917DD177D3767F00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ToperBarrientos_0-1711163573169.png" alt="ToperBarrientos_0-1711163573169.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 23 Mar 2024 03:13:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596070#M6449</guid>
      <dc:creator>Toper Barrientos</dc:creator>
      <dc:date>2024-03-23T03:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hotspot "array" static hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596106#M6450</link>
      <description>&lt;P&gt;Hi Toper,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your coding! I am super perplexed as your code works fine for me also when separated from my object. When I try the code in my object, it returns a simple static hotspot no matter what options of code I try using in the array. I read here of a similar issue:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.graphisoft.com/t5/Libraries-objects/GDL-Editable-3D-Hotspot-within-Array/td-p/297511" target="_blank"&gt;https://community.graphisoft.com/t5/Libraries-objects/GDL-Editable-3D-Hotspot-within-Array/td-p/297511&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Their solution of &lt;SPAN&gt;adding a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;glob_modpar&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;statement, is confusing. I am unsure what it would change? Maybe it is needed to cause the code to run again. Any thoughs most welcome.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Many thanks, Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2024 20:38:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596106#M6450</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2024-03-24T20:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hotspot "array" static hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596122#M6451</link>
      <description>&lt;P&gt;If you did not replace your placed object after you changed your parameter to an array it will not work properly as the old objects values are not defined properly, it is not looking for an array. The same thing happens when you change the size of an array. When changing a parameter to an array type, I will usually delete the parameter, save it which will brick any existing objects, then recreate the parameter. You can also initiallise the array at the start of your script or in the parameter script then go and redefine each paramter value through a loop. Required if you are dynamically changing the array size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 01:41:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596122#M6451</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2024-03-25T01:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hotspot "array" static hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596529#M6453</link>
      <description>&lt;P&gt;Hi Ling,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your guidance. I am still unsuccessful after all this time with this particular set of array hotspots. Very confusing as to why it doesn't work in the object. I am happy to use the basic multi-line method for now as the object is working. Wishing you the best, Matt&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 19:08:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596529#M6453</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2024-03-27T19:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hotspot "array" static hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596581#M6454</link>
      <description>&lt;P&gt;Did you initiallise your arrays?&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;DIM X[ ]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;DIM Len[ ]&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 01:22:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Hotspot-quot-array-quot-static-hotspots/m-p/596581#M6454</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2024-03-28T01:22:26Z</dc:date>
    </item>
  </channel>
</rss>

