<?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: Angle graphical hotspot in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93162#M39952</link>
    <description>I have a routine that does this, but it may not be what you want. You can move a point on the radius arbitrarily, modifying the radius and angle at the same time, but you can't input the radius or the angle while moving. The radius/angle and the XY position of the spot are independent parameters bound together by GLOB_MODPAR_NAME. The parameters you see as you move the spot are the XY position parameters. &lt;BR /&gt;
&lt;BR /&gt;
If you're interested,&lt;BR /&gt;
&lt;BR /&gt;
!Parameters&lt;BR /&gt;
!lenx : X distance&lt;BR /&gt;
!leny : Y distance&lt;BR /&gt;
!rad : radius&lt;BR /&gt;
!ng : angle&lt;BR /&gt;

&lt;PRE&gt;!Master Script
!when X &amp;amp; Y are modified graphically, recalculate rad &amp;amp; ng.
IF GLOB_MODPAR_NAME='lenx' OR GLOB_MODPAR_NAME='leny' THEN
	ng=ATN(leny/lenx)
	IF lenx&amp;lt;0 THEN ng=90+(90+ng)
	IF leny&amp;lt;0 THEN ng=360+ng
	IF ng&amp;gt;360 THEN ng=ng-360
	PARAMETERS ng=ng
	rad=SQR(lenx^2+leny^2)
	PARAMETERS rad=rad
ENDIF

!when rad &amp;amp; ng are modified in the settings, or with other spots, recalculate X &amp;amp; Y.
IF GLOB_MODPAR_NAME='rad' OR GLOB_MODPAR_NAME='ng' THEN
	lenx=rad*COS(ng)
	PARAMETERS lenx=lenx
	leny=rad*SIN(ng)
	PARAMETERS leny=leny
ENDIF&lt;/PRE&gt;

&lt;PRE&gt;!2D Script
HOTSPOT2 0, leny, hsid, lenx, 1+128 : hsid=hsid+1 !b
HOTSPOT2 lenx, leny, hsid, lenx, 2 : hsid=hsid+1 !m
HOTSPOT2 -1, leny, hsid, lenx, 3 : hsid=hsid+1 !r

HOTSPOT2 lenx, 0, hsid, leny, 1+128 : hsid=hsid+1 !b
HOTSPOT2 lenx, leny, hsid, leny, 2 : hsid=hsid+1 !m
HOTSPOT2 lenx, -1, hsid, leny, 3 : hsid=hsid+1 !r

ARC2 0,0,rad,0,ng

HOTSPOT2 0,0
HOTSPOT2 rad,0
&lt;/PRE&gt;

You could add editing hotspots for rad, or use A for the radius instead.&lt;BR /&gt;
&lt;BR /&gt;
I have found, as you did, that overlapping angle and length hotspots don't work.</description>
    <pubDate>Wed, 04 Aug 2004 16:46:54 GMT</pubDate>
    <dc:creator>James Murray</dc:creator>
    <dc:date>2004-08-04T16:46:54Z</dc:date>
    <item>
      <title>Angle graphical hotspot</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93161#M39951</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I can't figure how to link a radius value to an angle hotspot (like X and Y values for the same hotspot).&lt;BR /&gt;
I get either the angle value, or the radius value, but not both (for the same hotspot).&lt;BR /&gt;
Any advice?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Aug 2004 13:42:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93161#M39951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-08-04T13:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Angle graphical hotspot</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93162#M39952</link>
      <description>I have a routine that does this, but it may not be what you want. You can move a point on the radius arbitrarily, modifying the radius and angle at the same time, but you can't input the radius or the angle while moving. The radius/angle and the XY position of the spot are independent parameters bound together by GLOB_MODPAR_NAME. The parameters you see as you move the spot are the XY position parameters. &lt;BR /&gt;
&lt;BR /&gt;
If you're interested,&lt;BR /&gt;
&lt;BR /&gt;
!Parameters&lt;BR /&gt;
!lenx : X distance&lt;BR /&gt;
!leny : Y distance&lt;BR /&gt;
!rad : radius&lt;BR /&gt;
!ng : angle&lt;BR /&gt;

&lt;PRE&gt;!Master Script
!when X &amp;amp; Y are modified graphically, recalculate rad &amp;amp; ng.
IF GLOB_MODPAR_NAME='lenx' OR GLOB_MODPAR_NAME='leny' THEN
	ng=ATN(leny/lenx)
	IF lenx&amp;lt;0 THEN ng=90+(90+ng)
	IF leny&amp;lt;0 THEN ng=360+ng
	IF ng&amp;gt;360 THEN ng=ng-360
	PARAMETERS ng=ng
	rad=SQR(lenx^2+leny^2)
	PARAMETERS rad=rad
ENDIF

!when rad &amp;amp; ng are modified in the settings, or with other spots, recalculate X &amp;amp; Y.
IF GLOB_MODPAR_NAME='rad' OR GLOB_MODPAR_NAME='ng' THEN
	lenx=rad*COS(ng)
	PARAMETERS lenx=lenx
	leny=rad*SIN(ng)
	PARAMETERS leny=leny
ENDIF&lt;/PRE&gt;

&lt;PRE&gt;!2D Script
HOTSPOT2 0, leny, hsid, lenx, 1+128 : hsid=hsid+1 !b
HOTSPOT2 lenx, leny, hsid, lenx, 2 : hsid=hsid+1 !m
HOTSPOT2 -1, leny, hsid, lenx, 3 : hsid=hsid+1 !r

HOTSPOT2 lenx, 0, hsid, leny, 1+128 : hsid=hsid+1 !b
HOTSPOT2 lenx, leny, hsid, leny, 2 : hsid=hsid+1 !m
HOTSPOT2 lenx, -1, hsid, leny, 3 : hsid=hsid+1 !r

ARC2 0,0,rad,0,ng

HOTSPOT2 0,0
HOTSPOT2 rad,0
&lt;/PRE&gt;

You could add editing hotspots for rad, or use A for the radius instead.&lt;BR /&gt;
&lt;BR /&gt;
I have found, as you did, that overlapping angle and length hotspots don't work.</description>
      <pubDate>Wed, 04 Aug 2004 16:46:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93162#M39952</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2004-08-04T16:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Angle graphical hotspot</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93163#M39953</link>
      <description>&lt;BLOCKQUOTE&gt;James wrote:&lt;BR /&gt;I have found, as you did, that overlapping angle and length hotspots don't work.&lt;/BLOCKQUOTE&gt;

May be for the whislist? I let you do it, if you agree, because you&lt;BR /&gt;
will explain this better than me.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the workaround, not exactly what i need, as you said, but interesting.</description>
      <pubDate>Wed, 04 Aug 2004 17:47:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93163#M39953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-08-04T17:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Angle graphical hotspot</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93164#M39954</link>
      <description>&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=3431" target="_blank"&gt;Done.&lt;/A&gt; I hope I explained it well enough.&lt;BR /&gt;
&lt;BR /&gt;
I just realized I forgot to attach my screen shot of the posted code in action.&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/12597iE9313F23C3DCA3DB/image-size/large?v=v2&amp;amp;px=999" border="0" alt="ArcStretch.jpg" title="ArcStretch.jpg" /&gt;</description>
      <pubDate>Thu, 05 Aug 2004 16:08:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Angle-graphical-hotspot/m-p/93164#M39954</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2004-08-05T16:08:27Z</dc:date>
    </item>
  </channel>
</rss>

