<?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: Array &amp;amp; hotspots menu in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640985#M7166</link>
    <description>&lt;P&gt;I think it's not about dim_xy[][], but hot_mnu[].&lt;BR /&gt;In the center of the circles are hostspots dim_xy[][] - it's a simple matter.&lt;BR /&gt;And on the circle are hotspots hot_mnu[]. This is of course a simple example of handling two arrays: dim_xy[][] with +/-REAL values ​​and hot_mnu[] with +/-INTEGER values ​​with a limited range of &amp;lt;-1/0/1&amp;gt;.&lt;BR /&gt;In the "add new/remove" processes, hotspots related to hot_mnu[] are used. And first changes are made to hot_mnu[], and only then dim_xy[][].&lt;BR /&gt;The main problem, it seems to me, is to identify which hotspot hot_mnu[] is used. For this purpose, I use a for...next loop checking in which row the hot_mnu[] value has changed, i.e. &amp;lt;&amp;gt;0. After finding such a row I can perform operations on the main dim_xy[][] array (delete the row or add a new one).&lt;BR /&gt;The problem is the order of scripts and various other operations and saving in the hot_idx (the number of the clicked hotspot from hot_mnu[]) and hot_idprocess (=-1/0/1) parameters, and after using them, zeroing these variables.&lt;BR /&gt;That's why I included the hot_reset parameter, which appears in 2D instead of hot_mnu[] and helps to reset hot_idx=0, hot_idprocess=0 ("Click to RESET and try again"), before reusing the hotspots hot_mnu[]. I know it's a "prosthesis" but I have no idea (and experience) how to get around the problem and whether it's even possible.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu4.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79960i1ED1099D29DF4686/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenu4.gif" alt="HotspotMenu4.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried to create hot_mnu[] one element larger than dim_xy[][] but I do not really understand the idea etc.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2024 00:50:36 GMT</pubDate>
    <dc:creator>gaba</dc:creator>
    <dc:date>2024-11-27T00:50:36Z</dc:date>
    <item>
      <title>Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640884#M7159</link>
      <description>&lt;P&gt;I am creating an algorithm for graphically adding/subtracting elements of an array (dim_xy[ ][ ]) using hotspots (from the hot_mnu[ ] array).&lt;BR /&gt;It seems to me that adding new elements to the dim_xy[ ][ ] array works OK:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu1.gif" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79917iA80ABC0DE26B09A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HotspotMenu1.gif" alt="HotspotMenu1.gif" /&gt;&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But removing elements from the dim_xy[ ][ ] array unfortunately does not work properly because the last removed element of the array is restored:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu2.gif" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79918i5C1030B8BE9B550C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HotspotMenu2.gif" alt="HotspotMenu2.gif" /&gt;&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I noticed that for removing an element from the dim_xy[ ][ ] array to work, I have to click a hotspot not related to the hotspots hot_mnu[ ] before removing, i.e. remove in two stages:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu3.gif" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79919iBC4053CEFCBD817C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HotspotMenu3.gif" alt="HotspotMenu3.gif" /&gt;&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Where is the error? Can someone help?&lt;BR /&gt;I am attaching HotspotMenuGsm.zip (Ac27)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 14:40:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640884#M7159</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-24T14:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640885#M7160</link>
      <description>&lt;P&gt;You can not remove the edited parameter.&lt;/P&gt;
&lt;P&gt;Rather add one array element more than needeed and do not use it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 15:06:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640885#M7160</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-11-24T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640890#M7161</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;@&lt;A class="" href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/14606" target="_self"&gt;Pertti Paasky,&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;any example ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 16:18:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640890#M7161</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-24T16:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640944#M7164</link>
      <description>&lt;P&gt;Pertti's is suggesting that you increase your array size globally by 1 so that your array parameter is not deleting itself. I have not read the script, but is it that when n = -1 then&amp;nbsp;&lt;SPAN&gt;dim_xy [ n-1 ] [ n-1 ], and when n = 1 then&amp;nbsp;dim_xy [ n+1 ] [ n+1 ]? Given the suggestion, this would then become&amp;nbsp;dim_xy [ n ] [ n ] and dim_xy [ n+2 ] [ n+2 ]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 08:03:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640944#M7164</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2024-11-25T08:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640985#M7166</link>
      <description>&lt;P&gt;I think it's not about dim_xy[][], but hot_mnu[].&lt;BR /&gt;In the center of the circles are hostspots dim_xy[][] - it's a simple matter.&lt;BR /&gt;And on the circle are hotspots hot_mnu[]. This is of course a simple example of handling two arrays: dim_xy[][] with +/-REAL values ​​and hot_mnu[] with +/-INTEGER values ​​with a limited range of &amp;lt;-1/0/1&amp;gt;.&lt;BR /&gt;In the "add new/remove" processes, hotspots related to hot_mnu[] are used. And first changes are made to hot_mnu[], and only then dim_xy[][].&lt;BR /&gt;The main problem, it seems to me, is to identify which hotspot hot_mnu[] is used. For this purpose, I use a for...next loop checking in which row the hot_mnu[] value has changed, i.e. &amp;lt;&amp;gt;0. After finding such a row I can perform operations on the main dim_xy[][] array (delete the row or add a new one).&lt;BR /&gt;The problem is the order of scripts and various other operations and saving in the hot_idx (the number of the clicked hotspot from hot_mnu[]) and hot_idprocess (=-1/0/1) parameters, and after using them, zeroing these variables.&lt;BR /&gt;That's why I included the hot_reset parameter, which appears in 2D instead of hot_mnu[] and helps to reset hot_idx=0, hot_idprocess=0 ("Click to RESET and try again"), before reusing the hotspots hot_mnu[]. I know it's a "prosthesis" but I have no idea (and experience) how to get around the problem and whether it's even possible.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu4.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79960i1ED1099D29DF4686/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenu4.gif" alt="HotspotMenu4.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried to create hot_mnu[] one element larger than dim_xy[][] but I do not really understand the idea etc.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 00:50:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640985#M7166</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-27T00:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640997#M7168</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;
&lt;P&gt;I put some new parameters. Moving the assisting hotspot to the right adds a new parameter, left removes one.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 10:39:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/640997#M7168</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-11-25T10:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641008#M7170</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/14606"&gt;@Pertti Paasky&lt;/a&gt;,brilliant and simple! Thank you very much!&lt;/P&gt;&lt;P&gt;I also tried comparing the current and previous values ​​to recognize the edited hotspot, e.g.&lt;BR /&gt;dx=add_remove[i]-_add_remove[i] !difference&lt;BR /&gt;but that was within one two-column array dim[current val][previous val]. Unfortunately, errors in another place discouraged me from further attempts.&lt;BR /&gt;OK, I'm now trying to convert your solution from REAL arrays to INT, so that it works like a menu, e.g.&lt;BR /&gt;VALUES{2} "add_remove" \&lt;BR /&gt;0,"&amp;gt;&amp;gt;",&lt;BR /&gt;3,"any action...",&lt;BR /&gt;2,"any action...",&lt;BR /&gt;1,"add new",&lt;BR /&gt;-1,"remove",&lt;BR /&gt;-2,"remove all" etc...&lt;BR /&gt;I'm getting something but not yet satisfactory.&lt;BR /&gt;I would like to use such a quick handy hotmenu to e.g. copy/paste materials between different surfaces, e.g. my own add-on to Wall Accessory or create new cutouts/overlays etc. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mywallaccessory.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79964i491700ADE2D3DC1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mywallaccessory.png" alt="mywallaccessory.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 12:19:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641008#M7170</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-25T12:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641018#M7171</link>
      <description>&lt;P&gt;Go ahead, gaba. I think it is ok to change to integers. In addition, my algorithm allows to multiply the same hotspot many times.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 13:34:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641018#M7171</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-11-25T13:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641040#M7174</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/14606"&gt;@Pertti Paasky&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Go ahead, gaba. I think it is ok to change to integers. In addition, my algorithm allows to multiply the same hotspot many times.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Pertti, your algorithm is great for cloning hotspots!&lt;/P&gt;
&lt;P&gt;But I  think it has one special feature: it doesn't allow to clone the same (!) hotspot to the same (!) place (i.e. at the same distance) multiple times:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu5.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79972i89E85F7492A6340D/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenu5.gif" alt="HotspotMenu5.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I added to your script zeroing the values ​​in add_remove and _add_remove (after finishing adding a new one etc.) and shortening these arrays according to the number of dim_xy[][] elements, but it doesn't help.&lt;/P&gt;
&lt;P&gt;In my opinion the problem lies somewhere in remembering the previous value of the hotspot and then comparing it with the new value (from dragging the hotspot).&lt;BR /&gt;That's why for now I don't know if I will implement this algorithm as a hotspot shortcut menu, where constant values ​​and repeating integers 1,2,3... are used.&lt;/P&gt;
&lt;P&gt;Because some hotspots will remember once selected INTEGER value (e.g. 1), and then unnecessarily remember it in both add_remove and _add_remove arrays. And then you need to somehow force reset/clear both arrays. Unless someone has an idea for that.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 00:49:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641040#M7174</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-27T00:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641081#M7176</link>
      <description>&lt;P&gt;OK, I've come full circle and returned to my original algorithm, despite having to "double click" occasionally to reset the "hotspot memory".&lt;/P&gt;
&lt;P&gt;For now, I find it easier to control and extend the VALUES{2} options as INTEGER.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenuMy.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79989i78CEC812ADE895D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenuMy.gif" alt="HotspotMenuMy.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 00:49:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641081#M7176</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-27T00:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641102#M7177</link>
      <description>&lt;P&gt;the GLOB_MODPAR_NAME is the problem&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="AllanP_1-1732579107380.png" style="width: 332px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79994iEBD06E83ADC528A6/image-dimensions/332x485?v=v2" width="332" height="485" role="button" title="AllanP_1-1732579107380.png" alt="AllanP_1-1732579107380.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;when changing the value it thinks the script runs, but it runs this happens&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;step 1&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_2-1732579166967.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79995i6CDBB95DF20BB24A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_2-1732579166967.png" alt="AllanP_2-1732579166967.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;step 2-remove point 3&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_3-1732579197571.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79996iB43081BEBF06D3A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_3-1732579197571.png" alt="AllanP_3-1732579197571.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;step3 remove another point, i selected&amp;nbsp; new point 4&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_4-1732579243257.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79997i7F912E17AEB73185/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_4-1732579243257.png" alt="AllanP_4-1732579243257.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;because another parameter isn't actually modified, the script does not fully run (the parameter operation does not run and inject the values back to the&amp;nbsp;library part parameters, only the temporary used variables are modified), and the ghost points stay.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this problem happens normally with editable hotspots, as you can edit parameters without going to the settings dialog box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you edit a variable other than the subtraction node then the script runs correctly (the parameters are injected back to the library part parameters) and the nodes are correctly set after this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gdl.graphisoft.com/gdl-style-guide/script-type-dependent-recommendations" target="_blank" rel="noopener"&gt;https://gdl.graphisoft.com/gdl-style-guide/script-type-dependent-recommendations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_5-1732581904462.png" style="width: 1007px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/80000i27403352A6820FC8/image-dimensions/1007x558?v=v2" width="1007" height="558" role="button" title="AllanP_5-1732581904462.png" alt="AllanP_5-1732581904462.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Even if the user changed the parameter specified in an if &lt;CODE&gt;GLOB_MODPAR_NAME &lt;/CODE&gt;condition, the else branch will be evaluated"&lt;/P&gt;
&lt;P&gt;this is what happens for the 2d output.&lt;/P&gt;
&lt;P&gt;(but the parameter script commands are not evaluated for the instance where the parameter is not the subtraction parameter, so no update to library part parameters)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when you open the settings dialogue box, the parameters part of the script is run and then the ghost points are deleted, so everything appears to have worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A classic "&lt;SPAN class="NA6bn BxUVEf UiGGAb ILfuVd"&gt;&lt;SPAN class="hgKElc"&gt;&lt;SPAN&gt;Schrödinger's Cat&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the answer is quiet simple and elegant:&lt;/P&gt;
&lt;P&gt;you just add a second add/subtract field, that you then evaluate on alternate loops&lt;/P&gt;
&lt;P&gt;hot_mnu_1 and hot_mnu_2, so you can do the same without having to have the "Click again" value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and you set a variable toggle to switch between them in 2d, solves the problem of the "GLOB_MODPAR_NAME" not&amp;nbsp; eqaul to....&lt;/P&gt;
&lt;P&gt;...sorry, i was working on the original library part.&lt;/P&gt;
&lt;P&gt;you could also just do a&amp;nbsp; &lt;SPAN&gt;VALUES&lt;/SPAN&gt; &lt;SPAN&gt;"hot_mnu" range[-total_count,100] so you could add up to 100 new objects&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 01:16:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641102#M7177</guid>
      <dc:creator>AllanP</dc:creator>
      <dc:date>2024-11-26T01:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641144#M7182</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/22492"&gt;@AllanP&lt;/a&gt;, thanks for giving me hope back, although my language barrier and lack of experience with gdl make it difficult for me to understand your explanations and achieve my goal...&lt;span class="lia-unicode-emoji" title=":worried_face:"&gt;😟&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 07:52:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641144#M7182</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-26T07:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641161#M7189</link>
      <description>&lt;P&gt;Do not worry, gaba. It is hard for me too to understand what experts suggest.&lt;/P&gt;
&lt;P&gt;Anyway I got a good hint from AllanP:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"you just add a second add/subtract field, that you then evaluate on alternate loops"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm not sure if I understood it right but...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The idea is use two parameters ("add_remove" and "_add_remove" ) for producing new points and switch between them by "valve" parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It works like 4 stroke combustion engine. When the "add_remove" parameter is working then the parameter "_add_remove" is resetting. Valve controls which parameter is in use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So every time You have a clean parameter array to mark the edited point.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There must be a restriction for loops, we need to run this only once. Therefore next lines are added:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;n &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; APPLICATION_QUERY &lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"parameter_script"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; "firstoccasion_in_progress"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; isFirstRun&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; isFirstRun &lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;endif .&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;By the way, it is usefull to specify all requirements for the object at the beginning.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 26 Nov 2024 09:36:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641161#M7189</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-11-26T09:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641168#M7191</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/22492"&gt;@AllanP&lt;/a&gt; and Pertti Paasky, Thank you very much for digging into the topic! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;quickly: before I just added hot_mnu2 and in the 2d script I drag hot_mnu and hot_mnu2 (and the user doesn't see the difference etc.), and in the code I compare the changes of hot_mnu with hot_mnu2... And something already works OK for me when adding new dim_xy elements.&lt;BR /&gt;I will soon decipher the removal of dim_xy elements, but ... Pertti Paasky, you anticipated my efforts ! I will soon test HotspotMenu_2!&lt;BR /&gt;I once practiced this mechanism of comparing the new and previous values ​​in other library objects, but in a two-column table as abs(hot_mnu[1][1]-hot_mnu[1][2])&amp;gt;.001 and it worked for me in the object parameters window.&lt;BR /&gt;Hmmmm, instead of struggling with how to show dynamically created elements in the UI (prism etc..) &lt;span class="lia-unicode-emoji" title=":grimacing_face:"&gt;😬&lt;/span&gt;, it would be better to simply provide the user with basic functions in the project in the 2D/3D window (change material etc.) in the cursor context menu.&lt;BR /&gt;After all, hotspots could have some extra BIT (e.g. +2048, 4096... ) that would allow you to easily connect the cursor context menu with the VALUES{2,3,4...} options to the hotspot. Then there would be no need to drag the cursor to select the value 1,2,3...&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 10:16:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641168#M7191</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-26T10:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641173#M7192</link>
      <description>&lt;P&gt;Try&amp;nbsp;VALUES{2}&lt;/P&gt;
&lt;P&gt;You can connect text type array to integer array.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 10:28:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641173#M7192</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-11-26T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641174#M7193</link>
      <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Expert lia-component-message-view-widget-author-username"&gt; &lt;A class="lia-link-navigation lia-page-link lia-user-name-link" style="color: #011622;" href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/14606" target="_self" aria-label="View Profile of Pertti Paasky"&gt;&lt;SPAN class=""&gt;@Pertti Paasky,&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;that's what I'll do eventually, and for now I have to switch my old way of understanding gdl to a new one after seeing e.g.:&lt;BR /&gt;n = APPLICATION_QUERY ("parameter_script", "firstoccasion_in_progress", isFirstRun)&lt;BR /&gt;if isFirstRun then...&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"A man learns his whole life and still dies stupid..."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="lia-message-author-rank lia-component-author-rank lia-component-message-view-widget-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 26 Nov 2024 10:32:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641174#M7193</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-26T10:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641202#M7196</link>
      <description>&lt;P&gt;What a twist! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;BR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/14606"&gt;@Pertti Paasky&lt;/a&gt;, I've slimmed down your code and I think it works OK.&lt;BR /&gt;1. I've integrated repeatable operations (when using "add_remove" or "_add_remove").&lt;BR /&gt;2. At the end I've added reset/update of the "add_remove" a nd "_add_remove" arrays when they're no longer used.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu26.gif" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/80025i1B715FB316E3DE01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HotspotMenu26.gif" alt="HotspotMenu26.gif" /&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now I'll get down to connecting INTEGER Values{2}...&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 13:06:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641202#M7196</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-26T13:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Array &amp; hotspots menu</title>
      <link>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641337#M7199</link>
      <description>&lt;P&gt;planned goal achieved ! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;BR /&gt;1 - identification of a dragged hotspot&lt;BR /&gt;2 - sample menu of VALUES{2} options connected to the hotspots&lt;BR /&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;(and I also switched the hotmenu tables REAL&amp;gt;INTEGER and changed the names of variables according to my own concept; while dragging hotspots you just have to be careful to "hit" the INTEGER values ​​1,2,3,-1,-5 etc, because this algorithm is more focused on using the hotmenu than regular dragging)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;Thank you very much AllanP and Pertti Paasky for your interest in the subject and substantive help &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu_mymenu.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/80094iBF7CD75AB4745C45/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenu_mymenu.gif" alt="HotspotMenu_mymenu.gif" /&gt;&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;────────────────────────&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;for the sake of order and to finish the topic I am attaching the source object developed by Pertti in which it is easy to add new hotspots (drag to the right) and remove hotspots (drag to the left); this object operates with add_remove[] and _add_remove[] arrays and REAL values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu_Pertti.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/80144i3A71D65D623513E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenu_Pertti.gif" alt="HotspotMenu_Pertti.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;────────────────────────&lt;/P&gt;
&lt;P&gt;Edit 2:&lt;/P&gt;
&lt;P&gt;In order not to forget the whole idea of ​​the hotspot menu (because I have to leave this fun for later and focus on architecture), I prepared a template for practical use of the hotspot menu, so that it works like LEGO blocks.&lt;/P&gt;
&lt;P&gt;This is an example of a library object with two groups of figures - circles and rectangles.&lt;/P&gt;
&lt;P&gt;Both groups use their own data tables without any restrictions on the number of figures in the group.&lt;/P&gt;
&lt;P&gt;Both groups can use a common universal subroutine (GOSUB "HotSpotMenu") to share the hotspot menu.&lt;/P&gt;
&lt;P&gt;The CIRCLES group allows you to perform basic operations using the hotspot menu: moving/adding/removing circles.&lt;/P&gt;
&lt;P&gt;The RECTANGLES group is more advanced, it also allows you to copy/paste using the hotspot menu: sizes/pen/rotation.&lt;BR /&gt;Of course, there can be more similar groups of "2D/3D figures" with specific properties that can be quickly controlled via the Hotspot menu (without opening the object settings window and wondering which figure I want to grab e.g. dimensions from and paste to another figure). Each group works with several parameters/variables, e.g.:&lt;BR /&gt;dim_rect_geom[][] — geometry (position, size of rectangle)&lt;BR /&gt;hot_rect_mnu[] — hotspot menu (VALUES{2}...)&lt;BR /&gt;hot_rect_mnu2[] — hotspot twin menu (VALUES{2}...)&lt;BR /&gt;hot_rect_mnu_id — INT returned number of the clicked hotspot&lt;BR /&gt;hot_rect_mnu_val — INT returned code (from VALUE{2}...) of the clicked hotspot&lt;BR /&gt;hot_rect_mnu_switch — menu switch 0/1 ..._mnu/..._mnu2&lt;BR /&gt;And rectangle properties:&lt;BR /&gt;hot_rect_rot[] — orientation angles of individual rectangles&lt;BR /&gt;hot_rect_pen[] — pens of individual rectangles&lt;BR /&gt;hot_rect_...[] — other rectangle properties&lt;BR /&gt;etc.&lt;BR /&gt;Of course, this is an object prototype and I understand that I ultimately need a GUI. But in this example I wanted to move some of the editing to where the "figures" are most visible (and accessible) - directly in the project. This is important, especially when there are more than a few "figures" in the library object.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HotspotMenu_template.gif" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/80217i1FDABAFE4C13D18B/image-size/large?v=v2&amp;amp;px=999" role="button" title="HotspotMenu_template.gif" alt="HotspotMenu_template.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;By the way, I fixed some minor bugs in the previous objects (HotspotMenu_Pertti.gsm, HotspotMenu.gsm)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 23:17:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Array-amp-hotspots-menu/m-p/641337#M7199</guid>
      <dc:creator>gaba</dc:creator>
      <dc:date>2024-11-28T23:17:28Z</dc:date>
    </item>
  </channel>
</rss>

