<?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: Moveable Hotspot Error in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145602#M25510</link>
    <description>&lt;BLOCKQUOTE&gt;CU wrote:&lt;BR /&gt;Archicad (not only your object) cannot have more than a hotspot "1".&lt;BR /&gt;
&lt;BR /&gt;
Make it dynamic.&lt;/BLOCKQUOTE&gt;

CU Micro, I don't understand. What happens then if you insert the same object more than once?  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt;</description>
    <pubDate>Mon, 29 Dec 2008 02:51:10 GMT</pubDate>
    <dc:creator>vistasp</dc:creator>
    <dc:date>2008-12-29T02:51:10Z</dc:date>
    <item>
      <title>Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145597#M25505</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi everybody, Happy Holidays!!&lt;BR /&gt;
&lt;BR /&gt;
We use a very basic marker for doors in plan. To create the most basic I saved Archicad11 door script as my own and made some changes. My utmost concern was keeping the text readable regardless of the SYMB_ROTANGLE and WALL_DIRECTION. Once I accomplished this I couldn't leave well enough alone!! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; In some situations we need to move the text to a different spot so I added the "Movable Hotspot". I've used this before and never had a problem. In the case of this door though I keep getting these "Duplicate unID" warnings. This object seems to work fine but I can't stand the fact that I'm getting these warnings. I've attached a screen shot of the warnings and the script I added is below.  The text statements at the end of the script were used to figure out in which situations I needed to rotate the text to my liking. (by the way, I have a feeling that the script I wrote could be done more efficiently. If so please let me know). Any insight would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Doug&lt;BR /&gt;
&lt;BR /&gt;
IF WALL_DIRECTION &amp;gt;90 AND WALL_DIRECTION&amp;lt;270 AND SYMB_ROTANGLE=0 THEN&lt;BR /&gt;
	ROT2 180&lt;BR /&gt;
	ADD2 0, WALL_THICKNESS&lt;BR /&gt;
ENDIF&lt;BR /&gt;
IF WALL_DIRECTION &amp;lt;90 AND SYMB_ROTANGLE=180 THEN&lt;BR /&gt;
	ROT2 180&lt;BR /&gt;
	ADD2 0, WALL_THICKNESS&lt;BR /&gt;
ENDIF&lt;BR /&gt;
IF WALL_DIRECTION&amp;gt;270 AND SYMB_ROTANGLE=180 THEN&lt;BR /&gt;
	ROT2 180&lt;BR /&gt;
	ADD2 0, WALL_THICKNESS&lt;BR /&gt;
ENDIF&lt;BR /&gt;
verti=verti + 2 1/2" - WALL_THICKNESS/2&lt;BR /&gt;
unID=1 &lt;BR /&gt;
!_________________________moving it horizontally &lt;BR /&gt;
hotspot2 0,verti,unID,horz,1+128 : unID=unID+1 &lt;BR /&gt;
hotspot2 -1,verti,unID,horz,3 : unID=unID+1 &lt;BR /&gt;
hotspot2 horz,verti,unID,horz,2+256 : unID=unID+1 &lt;BR /&gt;
&lt;BR /&gt;
!_________________________moving it vertically &lt;BR /&gt;
hotspot2 horz,0,unID,verti,1+128 : unID=unID+1 &lt;BR /&gt;
hotspot2 horz,-1,unID,verti,3 : unID=unID+1 &lt;BR /&gt;
hotspot2 horz,verti,unID,verti,2+256 : unID=unID+1 &lt;BR /&gt;
&lt;BR /&gt;
define style 'covtext' arial,1.75,2,0 &lt;BR /&gt;
set style 'covtext' &lt;BR /&gt;
text2 horz,verti,FPT &lt;BR /&gt;
PEN 121&lt;BR /&gt;
	TEXT2 0,6",SYMB_ROTANGLE &lt;BR /&gt;
PEN 126&lt;BR /&gt;
	TEXT2 0,16",STR("%0.16FFI",WALL_THICKNESS)&lt;BR /&gt;
PEN 125&lt;BR /&gt;
	TEXT2 0,26",WALL_DIRECTION &lt;BR /&gt;
END&lt;/R&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/74733i169BB441D86FFCA9/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Duplicate unID's.PNG" title="Duplicate unID's.PNG" /&gt;</description>
      <pubDate>Wed, 24 May 2023 08:58:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145597#M25505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-24T08:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145598#M25506</link>
      <description>Try this&lt;BR /&gt;
&lt;BR /&gt;
.... cut .....&lt;BR /&gt;
&lt;BR /&gt;
verti=verti + 2 1/2" - WALL_THICKNESS/2&lt;BR /&gt;
&lt;BR /&gt;
unID=12345 + unID ! ;@)&lt;BR /&gt;
!_________________________moving it horizontally&lt;BR /&gt;
hotspot2 0,verti,unID,horz,1+128 : unID=unID+1&lt;BR /&gt;
hotspot2 -1,verti,unID,horz,3 : unID=unID+1&lt;BR /&gt;
hotspot2 horz,verti,unID,horz,2+256 : unID=unID+1&lt;BR /&gt;
&lt;BR /&gt;
.... cut ....</description>
      <pubDate>Sun, 28 Dec 2008 00:16:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145598#M25506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-28T00:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145599#M25507</link>
      <description>You know when I saw the wink and the 12345 I thought you were messing with me &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt; turns out it worked! So I'm assuming that the unID can be any number I choose as long as it doesn't match any other. (that would expain the term "Unique")I gotta be honest...I've used this movable hotspot more than once but I never claimed to fully understand how it works! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Sun, 28 Dec 2008 01:14:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145599#M25507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-28T01:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145600#M25508</link>
      <description>&lt;BLOCKQUOTE&gt;4thorns wrote:&lt;BR /&gt;I'm assuming that the unID can be any number I choose as long as it doesn't match any other.&lt;/BLOCKQUOTE&gt;

Absolutely! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Sun, 28 Dec 2008 02:53:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145600#M25508</guid>
      <dc:creator>vistasp</dc:creator>
      <dc:date>2008-12-28T02:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145601#M25509</link>
      <description>unID = 12345 + unID &lt;BR /&gt;
&lt;BR /&gt;
 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
"12345" is a joke but &lt;BR /&gt;
"+unID" is very important.&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;I'm assuming that the unID can be any number I choose as long as it doesn't match any other.&lt;/BLOCKQUOTE&gt;

Correct, but, in your case you start with the same ID number, "1".&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;verti=verti + 2 1/2" - WALL_THICKNESS/2&lt;BR /&gt;
unID=1 &lt;/BLOCKQUOTE&gt;

Archicad (not only your object) cannot have more than a hotspot "1".&lt;BR /&gt;
&lt;BR /&gt;
Make it dynamic.</description>
      <pubDate>Sun, 28 Dec 2008 11:23:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145601#M25509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-28T11:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145602#M25510</link>
      <description>&lt;BLOCKQUOTE&gt;CU wrote:&lt;BR /&gt;Archicad (not only your object) cannot have more than a hotspot "1".&lt;BR /&gt;
&lt;BR /&gt;
Make it dynamic.&lt;/BLOCKQUOTE&gt;

CU Micro, I don't understand. What happens then if you insert the same object more than once?  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 29 Dec 2008 02:51:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145602#M25510</guid>
      <dc:creator>vistasp</dc:creator>
      <dc:date>2008-12-29T02:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145603#M25511</link>
      <description>Hello Vistasp, &lt;BR /&gt;
I just did the following experiment. &lt;BR /&gt;
I created a new object and typed &lt;BR /&gt;
the following code in the 2D script. &lt;BR /&gt;
 &lt;BR /&gt;
Pen 10 &lt;BR /&gt;
 &lt;BR /&gt;
hotspot2 0,0,1 &lt;BR /&gt;
 &lt;BR /&gt;
hotspot2 0,0,1 &lt;BR /&gt;
 &lt;BR /&gt;
circle2 0,0,1" &lt;BR /&gt;
 &lt;BR /&gt;
I then checked script and got the error message &lt;BR /&gt;
Duplicate unique IDs at line yada yada &lt;BR /&gt;
But the 2D window processed with no run time errors. &lt;BR /&gt;
 &lt;BR /&gt;
So, apparently, this triggers a check script error but does not&lt;BR /&gt;
prevent the 2D script from running.&lt;BR /&gt;
&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Mon, 29 Dec 2008 04:12:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145603#M25511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-29T04:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145604#M25512</link>
      <description>&lt;BLOCKQUOTE&gt;vistasp wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;CU wrote:&lt;BR /&gt;Archicad (not only your object) cannot have more than a hotspot "1".&lt;BR /&gt;
&lt;BR /&gt;
Make it dynamic.&lt;/BLOCKQUOTE&gt;

CU Micro, I don't understand. What happens then if you insert the same object more than once?  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt;&lt;/BLOCKQUOTE&gt;

To clarify:  the uniqueness of hotspot ID's is an issue only within a single placed object.  There can only be one hotspot "1" in any particular object.  But, all objects can have a hotspot "1".&lt;BR /&gt;
&lt;BR /&gt;
However, when an object calls macros, those macros are in essence part of the same object... they are all interpreted in order to generated the representation of the object.  So, all hotspots across all called macros must be unique.&lt;BR /&gt;
&lt;BR /&gt;
It seems that in Doug's case, some other code - perhaps the door itself that called his marker (not really sure what he modified - the marker or the door) - already started numbering hotspots 1, 2, 3 ...  so he needed to start someplace higher.&lt;BR /&gt;
&lt;BR /&gt;
Putting UnID=UnID+12345 does not make sense, because UnID is not defined in the current object. It may work through AC 12 (undefined variables are interpreted as zero, so that statement is the same as UnID=12345) - but from another thread, we know that this behavior may not continue in the future.&lt;BR /&gt;
&lt;BR /&gt;
Simply put UnID=500 (or whatever) to initialize your ID's someplace higher than those that GS used.  (It would be nice if there was a document listing ranges of hotspot numbers used in GS macros and some standard saying that users were free to use those greater than X.  But, just pick a number that works.)&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Karl</description>
      <pubDate>Mon, 29 Dec 2008 04:16:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145604#M25512</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2008-12-29T04:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145605#M25513</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt; &lt;BR /&gt;
I just did the following experiment. &lt;BR /&gt;
I created a new object and typed &lt;BR /&gt;
the following code in the 2D script. &lt;BR /&gt;
 
&lt;PRE&gt;Pen 10 
hotspot2 0,0,1 
hotspot2 0,0,1 
circle2 0,0,1" &lt;/PRE&gt;
 &lt;BR /&gt;
I then checked script and got the error message &lt;BR /&gt;
Duplicate unique IDs at line yada yada &lt;BR /&gt;
But the 2D window processed with no run time errors. 
&lt;/BLOCKQUOTE&gt;

Hi Peter,&lt;BR /&gt;
&lt;BR /&gt;
The reason you did not get an error when you displayed the 2D symbol is because your hotspot (HOTSPOT2 x, y, unID) does NOT create an editable hotspot in the user interface.&lt;BR /&gt;
&lt;BR /&gt;
Thus, Checkscript warns you - but there will be no runtime errors.&lt;BR /&gt;
&lt;BR /&gt;
To get a runtime error, you must create an editable hotspot by associating a parameter and flags with the extended syntax as in the examples earlier in the thread or here:&lt;BR /&gt;
&lt;A href="http://download.graphisoft.com/ftp/gdl/manual/12/wwhelp/wwhimpl/js/html/wwhelp.htm" target="_blank"&gt;&lt;LINK_TEXT text="http://download.graphisoft.com/ftp/gdl/ ... wwhelp.htm"&gt;http://download.graphisoft.com/ftp/gdl/manual/12/wwhelp/wwhimpl/js/html/wwhelp.htm&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Karl</description>
      <pubDate>Mon, 29 Dec 2008 04:20:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145605#M25513</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2008-12-29T04:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145606#M25514</link>
      <description>Hello Karl,  &lt;BR /&gt;
Doug wrote:  &lt;BR /&gt;
"though I keep getting these "Duplicate unID" warnings. This object seems to work fine"  &lt;BR /&gt;
He was scripting editable hotspots with their extended parameters to  &lt;BR /&gt;
create editable hotspots. &lt;BR /&gt;
You wrote: &lt;BR /&gt;
"To get a runtime error, you must create an editable hotspot by associating a parameter and flags with the extended syntax" &lt;BR /&gt;
 &lt;BR /&gt;
So, it seems that even though, you write an editable hotspot, that &lt;BR /&gt;
contains a duplicate ID, it does not cause a runtime error and the &lt;BR /&gt;
2D script runs without error.  &lt;BR /&gt;
 &lt;BR /&gt;
I am a bit puzzled .&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Mon, 29 Dec 2008 04:55:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145606#M25514</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-29T04:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145607#M25515</link>
      <description>&lt;BLOCKQUOTE&gt;Karl wrote:&lt;BR /&gt;To clarify:  the uniqueness of hotspot ID's is an issue only within a single placed object.  There can only be one hotspot "1" in any particular object.  But, all objects can have a hotspot "1".&lt;BR /&gt;
&lt;BR /&gt;
However, when an object calls macros, those macros are in essence part of the same object... they are all interpreted in order to generated the representation of the object.  So, all hotspots across all called macros must be unique.&lt;/BLOCKQUOTE&gt;

Thanks for that explanation Karl. That makes a lot more sense.&lt;BR /&gt;
&lt;BR /&gt;
Re: the unID = 12345 + unID statement, I misread it the first time and assumed the unID was being initialised at 12345. My mistake.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 29 Dec 2008 06:09:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145607#M25515</guid>
      <dc:creator>vistasp</dc:creator>
      <dc:date>2008-12-29T06:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145608#M25516</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;So, it seems that even though, you write an editable hotspot, that contains a duplicate ID, it does not cause a runtime error and the 2D script runs without error.&lt;/BLOCKQUOTE&gt;

Could it be that the 2D script works but the hotspots aren't editable?</description>
      <pubDate>Mon, 29 Dec 2008 06:11:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145608#M25516</guid>
      <dc:creator>vistasp</dc:creator>
      <dc:date>2008-12-29T06:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Moveable Hotspot Error</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145609#M25517</link>
      <description>Peter:&lt;BR /&gt;
&lt;BR /&gt;
If you change your script to:&lt;BR /&gt;
&lt;FONT color="blue"&gt;Pen 10&lt;BR /&gt;
hotspot2 0,0&lt;BR /&gt;
hotspot2 0,0&lt;BR /&gt;
circle2 0,0,1"&lt;/FONT&gt;&lt;BR /&gt;
You will not get the error message, because for the non-editable hotspots, the unID is optional. For the editable hotspots, the unID is required.&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Mon, 29 Dec 2008 13:32:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Moveable-Hotspot-Error/m-p/145609#M25517</guid>
      <dc:creator>David Maudlin</dc:creator>
      <dc:date>2008-12-29T13:32:33Z</dc:date>
    </item>
  </channel>
</rss>

