<?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: Graphic Toggling with Hotpsots in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285851#M7557</link>
    <description>After seeing what you were trying to do I just had to modify the code a little.&lt;BR /&gt;
&lt;BR /&gt;
master script:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;
UnIDtest = 1


If GLOB_MODPAR_NAME = "cornerLX1" or GLOB_MODPAR_NAME = "cornerLY1" then 
	cornerLX1 = cornerLX1
	cornerLY1 = cornerLY1
else
	if cornerLX1 &amp;gt; .0001 or cornerLX1 &amp;lt; -.0001 then 
		cornerLX1 = 0
		parameters cornerLX1 = cornerLX1 
	endif
	if cornerLY1 &amp;gt; .0001 or cornerLY1 &amp;lt; -.0001 then 
		cornerLY1 = 0
		parameters cornerLY1 = cornerLY1 
	endif
endif 



	if cornerLX1 &amp;gt; .0001 then 
		IF cornerLX1 &amp;lt;= 2 THEN figx = 1
		IF cornerLX1 &amp;gt;2 THEN figX = 2
		IF cornerLX1 &amp;gt;5 THEN figX = 3
		IF cornerLX1 &amp;gt;8 THEN figX = 4
		IF cornerLX1 &amp;gt;11 THEN figX = 5
		parameters figx = figx
	endif



	if CornerLY1 &amp;gt; .0001 then 
		IF cornerLY1 &amp;lt;= 1 THEN figy = 1
		IF cornerLY1 &amp;gt; 1 THEN figy = 2
		IF cornerLY1 &amp;gt; 3 THEN figy = 3
		IF cornerLY1 &amp;gt; 5 THEN figy = 4
		IF cornerLY1 &amp;gt; 7 THEN figy = 5
		parameters figy = figy 
	endif

&lt;/PRE&gt;

2d script: &lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;!!******* HOTSPOT CONTROL ******* 


		!! X Dimension hotspots
		HOTSPOT2 0, cornerLY1, UnIDtest, cornerLX1, 1+128 : UnIDtest = UnIDtest + 1
		HOTSPOT2 -1, cornerLY1, UnIDtest, cornerLX1, 3 : UnIDtest = UnIDtest + 1
		HOTSPOT2 cornerLX1, cornerLY1, UnIDtest, cornerLX1, 2 : UnIDtest = UnIDtest + 1

		!! Y dimension hotspots
		HOTSPOT2 cornerLX1, 0, UnIDtest, cornerLY1, 1+128 : UnIDtest = UnIDtest + 1
		HOTSPOT2 cornerLX1, -1, UnIDtest, cornerLY1, 3 : UnIDtest = UnIDtest + 1
		HOTSPOT2 cornerLX1, cornerLY1, UnIDtest, cornerLY1, 2 : UnIDtest = UnIDtest + 1




!!******* HOTSPOT CONTROL ******* 

	
pen     penAttribute_1
fill fillAttribute_1

for j = 1 to figy
	for i = 1 to figX

	poly2_b{5}       5,      3,      1,      3, penAttribute_1, penAttribute_2, 
			  0, 0, 1, 0, 0, 1, 0, 
			  0, 0,     33, 
			  0, 1,     33, 
			  2, 1,     33, 
			  2, 0,     33, 
			  0, 0,     33
	
	add2 3,0
	next i
del figx
add2 0, 2
next j&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 May 2016 01:14:30 GMT</pubDate>
    <dc:creator>SenecaDesignLLC</dc:creator>
    <dc:date>2016-05-25T01:14:30Z</dc:date>
    <item>
      <title>Graphic Toggling with Hotpsots</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285847#M7553</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I am trying to create a graphic toggle switch with Hotspots. Basically, I would like to drag a hotspot away from it's original position, release it, make changes to the object based on the dimensions of where it was released, and then return the hotspot to its original position. Is this possible?&lt;/T&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/17371iAFC3C12D67484DEB/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Screen Shot 2016-05-23 at 10.07.22 AM.png" title="Screen Shot 2016-05-23 at 10.07.22 AM.png" /&gt;</description>
      <pubDate>Mon, 23 May 2016 18:30:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285847#M7553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-23T18:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic Toggling with Hotpsots</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285848#M7554</link>
      <description>If GLOB_MODPAR_NAME = "hotspot_param" then&lt;BR /&gt;
     if hotspot_param &amp;gt; .0001 then final_dist = hotspot_param&lt;BR /&gt;
     parameters final_dist=final_dist&lt;BR /&gt;
     if hotspot_param &amp;gt; .0001 then hotspot_param = 0&lt;BR /&gt;
     parameters hotspot_param = hotspot_param&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
that should work in the master script.</description>
      <pubDate>Tue, 24 May 2016 03:59:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285848#M7554</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2016-05-24T03:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic Toggling with Hotpsots</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285849#M7555</link>
      <description>I´m using this (based on one object made by Heimo Mooslechner):&lt;BR /&gt;
&lt;BR /&gt;
A. PARAMETER SCRIPT:&lt;BR /&gt;
VALUES "fig" "None", "Circle", "Ellipse 2:1", "Box", "Rectangle 2:1"&lt;BR /&gt;
VALUES "fig_Switch"  0.00, 0.05, 0.10, 0.15, 0.20&lt;BR /&gt;
	IF fig_Switch = 0.00 THEN fig = "None"&lt;BR /&gt;
	IF fig_Switch = 0.05 THEN fig = "Circle"&lt;BR /&gt;
	IF fig_Switch = 0.10 THEN fig = "Ellipse 2:1"&lt;BR /&gt;
	IF fig_Switch = 0.15 THEN fig = "Box"&lt;BR /&gt;
	IF fig_Switch = 0.20 THEN fig = "Rectangle 2:1"&lt;BR /&gt;
&lt;BR /&gt;
B. 2D SCRIPT:&lt;BR /&gt;
!!******* BORDER STYLE *******&lt;BR /&gt;
	!! for Hotspot position coordinates&lt;BR /&gt;
	h41x = 0&lt;BR /&gt;
	h41y = -dif*2.75&lt;BR /&gt;
&lt;BR /&gt;
	HOTSPOT2 h41x, h41y, Uid, fig_Switch, 1+128 	: Uid = Uid+1   ! x base&lt;BR /&gt;
	HOTSPOT2 h41x, h41y, Uid, fig_Switch, 2 		: Uid = Uid+1   ! x move&lt;BR /&gt;
	HOTSPOT2   -1, h41y, Uid, fig_Switch, 3     	: Uid = Uid+10  ! x ref &lt;BR /&gt;
&lt;BR /&gt;
	!! for Hotspot associated TEXT position&lt;BR /&gt;
		ADD2 h41x+tp_x/2, h41y+tp_x/2&lt;BR /&gt;
		STYLE InterfaceText&lt;BR /&gt;
		PEN Pen_Text	&lt;BR /&gt;
		IF help_UI_Switch THEN TEXT2 0, 0, "BORDER Style (None/Circle/Ellipse 2:1/Box/Rectangle 2:1)= " + fig&lt;BR /&gt;
			IF fig_Switch  = 0.00 THEN fig = "None"&lt;BR /&gt;
			IF fig_Switch &amp;gt;0+EPS AND fig_Switch &amp;lt;= 0.05 THEN fig = "Circle"&lt;BR /&gt;
			IF fig_Switch &amp;gt;=0.06  AND fig_Switch &amp;lt;= 0.10 THEN fig = "Ellipse 2:1"&lt;BR /&gt;
			IF fig_Switch &amp;gt;=0.11  AND fig_Switch &amp;lt;= 0.15 THEN fig = "Box"&lt;BR /&gt;
			IF fig_Switch &amp;gt;=0.16  AND fig_Switch &amp;lt;= 0.20 THEN fig = "Rectangle 2:1"&lt;BR /&gt;
		DEL 1&lt;BR /&gt;
!!******* BORDER STYLE *******</description>
      <pubDate>Tue, 24 May 2016 09:38:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285849#M7555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-24T09:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic Toggling with Hotpsots</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285850#M7556</link>
      <description>Thank you both for your reply.&lt;BR /&gt;
&lt;BR /&gt;
Seneca - what you are proposing seems like a winner, but I can't get it to work.&lt;BR /&gt;
&lt;BR /&gt;
Andro - I can get your method to work beautifully in one axis. However, ideally,  I would like to get it to function on both the x and y axis simultaneously.&lt;BR /&gt;
&lt;BR /&gt;
I have attached 3 different objects, TESTER, TESTER 01 and TESTER 02.&lt;BR /&gt;
&lt;BR /&gt;
TESTER roughly works as I would like it, except for one vital piece. It does not return the hotspot back to the origin.&lt;BR /&gt;
&lt;BR /&gt;
TESTER 01 is built off of Andro's method, and works in the X axis only.&lt;BR /&gt;
&lt;BR /&gt;
TESTER 02 is attempting to use Seneca's method, but doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
I can post the code snippets if that works better.</description>
      <pubDate>Tue, 24 May 2016 17:52:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285850#M7556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-24T17:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic Toggling with Hotpsots</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285851#M7557</link>
      <description>After seeing what you were trying to do I just had to modify the code a little.&lt;BR /&gt;
&lt;BR /&gt;
master script:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;
UnIDtest = 1


If GLOB_MODPAR_NAME = "cornerLX1" or GLOB_MODPAR_NAME = "cornerLY1" then 
	cornerLX1 = cornerLX1
	cornerLY1 = cornerLY1
else
	if cornerLX1 &amp;gt; .0001 or cornerLX1 &amp;lt; -.0001 then 
		cornerLX1 = 0
		parameters cornerLX1 = cornerLX1 
	endif
	if cornerLY1 &amp;gt; .0001 or cornerLY1 &amp;lt; -.0001 then 
		cornerLY1 = 0
		parameters cornerLY1 = cornerLY1 
	endif
endif 



	if cornerLX1 &amp;gt; .0001 then 
		IF cornerLX1 &amp;lt;= 2 THEN figx = 1
		IF cornerLX1 &amp;gt;2 THEN figX = 2
		IF cornerLX1 &amp;gt;5 THEN figX = 3
		IF cornerLX1 &amp;gt;8 THEN figX = 4
		IF cornerLX1 &amp;gt;11 THEN figX = 5
		parameters figx = figx
	endif



	if CornerLY1 &amp;gt; .0001 then 
		IF cornerLY1 &amp;lt;= 1 THEN figy = 1
		IF cornerLY1 &amp;gt; 1 THEN figy = 2
		IF cornerLY1 &amp;gt; 3 THEN figy = 3
		IF cornerLY1 &amp;gt; 5 THEN figy = 4
		IF cornerLY1 &amp;gt; 7 THEN figy = 5
		parameters figy = figy 
	endif

&lt;/PRE&gt;

2d script: &lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;!!******* HOTSPOT CONTROL ******* 


		!! X Dimension hotspots
		HOTSPOT2 0, cornerLY1, UnIDtest, cornerLX1, 1+128 : UnIDtest = UnIDtest + 1
		HOTSPOT2 -1, cornerLY1, UnIDtest, cornerLX1, 3 : UnIDtest = UnIDtest + 1
		HOTSPOT2 cornerLX1, cornerLY1, UnIDtest, cornerLX1, 2 : UnIDtest = UnIDtest + 1

		!! Y dimension hotspots
		HOTSPOT2 cornerLX1, 0, UnIDtest, cornerLY1, 1+128 : UnIDtest = UnIDtest + 1
		HOTSPOT2 cornerLX1, -1, UnIDtest, cornerLY1, 3 : UnIDtest = UnIDtest + 1
		HOTSPOT2 cornerLX1, cornerLY1, UnIDtest, cornerLY1, 2 : UnIDtest = UnIDtest + 1




!!******* HOTSPOT CONTROL ******* 

	
pen     penAttribute_1
fill fillAttribute_1

for j = 1 to figy
	for i = 1 to figX

	poly2_b{5}       5,      3,      1,      3, penAttribute_1, penAttribute_2, 
			  0, 0, 1, 0, 0, 1, 0, 
			  0, 0,     33, 
			  0, 1,     33, 
			  2, 1,     33, 
			  2, 0,     33, 
			  0, 0,     33
	
	add2 3,0
	next i
del figx
add2 0, 2
next j&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2016 01:14:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Graphic-Toggling-with-Hotpsots/m-p/285851#M7557</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2016-05-25T01:14:30Z</dc:date>
    </item>
  </channel>
</rss>

