BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Having an issue with dynamic hotspots

JGoode
Advocate
Hi, I am having a problem with dynamic hotspots working correctly with this specific object. I can't seem to work it out.
	HOTSPOT -mirror_width/2, 0.024, 1.1,HSID+1, mirror_width, 1+128      !base 
	HSID = HSID+1 
	HOTSPOT -1, 0, 0, HSID+1, mirror_width, 3         !reference 
	HSID = HSID+1 
	HOTSPOT mirror_width/2, 0.024, 1.1 ,HSID+1, mirror_width, 2      !moveable
I can't get the hotspot to move accurately with the dimension shown in the picture. I know that it's because it is using -mirror_width/2 which is changing but I do not know an alternative option which is what I'm after.
Thanks

mirror width example.jpg
ArchiCAD 23

Windows 10
7 REPLIES 7
Erich
Contributor
I don't currently have ArchiCad open to confirm, but I would try this:
HOTSPOT -mirror_width/2, 0.024, 1.1, HSID, mirror_width, 1+128: HSID = HSID+1  !base 
HOTSPOT mirror_width/2, 0.024, 1.1 ,HSID, mirror_width, 2: HSID = HSID+1    !moveable
HOTSPOT 1, 0.024, 1.1, HSID, mirror_width, 3: HSID = HSID+1         !reference 
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
JGoode
Advocate
Erich wrote:
I don't currently have ArchiCad open to confirm, but I would try this:
HOTSPOT -mirror_width/2, 0.024, 1.1, HSID, mirror_width, 1+128: HSID = HSID+1  !base 
HOTSPOT mirror_width/2, 0.024, 1.1 ,HSID, mirror_width, 2: HSID = HSID+1    !moveable
HOTSPOT 1, 0.024, 1.1, HSID, mirror_width, 3: HSID = HSID+1         !reference 
It sadly behaves the same way as my original. Thanks for the reply.
ArchiCAD 23

Windows 10
Hmooslechner
Rockstar
In Your code - You are asking the Parameter mirror_width.

If You calculate within the sequence - archicad "gets puzzeld".

You dont have to calculate in the sequence!

You wrote: mirror_width/2

With /2 You get not working results on the asked parameter

Just try it without any calculation.
AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Hmooslechner
Rockstar
sorry for the mass of copied texts - something happend during klicking on the apply-Button. How can i delete this?
AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Barry Kelly
Moderator
Hmooslechner wrote:
sorry for the mass of copied texts - something happend during klicking on the apply-Button. How can i delete this?
You should be able to delete your last post so long as nobody else has replied to it - the delete "X" is next to the 'Edit' button.

If someone has replied then one of the moderators can delete the multiple posts.

I find the forum runs a bit slow sometimes so after pressing 'Submit' you get the feeling nothing has happened. So you press it again and again.
Finally it works and you end up with multiple post.
Sometimes it can take up to a minute to respond (so I am finding).

EDIT: for example this post took about 25 seconds after hitting the submit button before it finally went.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Pertti Paasky
Expert
Try this:

2 parameters: mirror_width,mirror_widthper2
Parameters script: parameters mirror_width=mirror_widthper2*2

2d script:

HSID=1

HOTSPOT2 0, 0.024, HSID, mirror_widthper2, 1+128 ,mirror_width :HSID=HSID+1 !base
HOTSPOT2 mirror_widthper2, 0.024, HSID, mirror_widthper2, 2 ,mirror_width :HSID=HSID+1 !moveable
HOTSPOT2 -1, 0.024, HSID, mirror_widthper2, 3 ,mirror_width :HSID=HSID+1 !reference

HOTSPOT2 0, 0.024, HSID, mirror_widthper2, 1+128 ,mirror_width :HSID=HSID+1 !base
HOTSPOT2 -mirror_widthper2, 0.024, HSID, mirror_widthper2, 2 ,mirror_width :HSID=HSID+1 !moveable
HOTSPOT2 1, 0.024, HSID, mirror_widthper2, 3 ,mirror_width :HSID=HSID+1 !reference

hotspot2 0,0
line2 mirror_width*.5,0,-mirror_width*.5,0
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.
Barry Kelly
Moderator
Pertti wrote:
Parameters script: parameters mirror_width=mirror_widthper2*2
This part is fine if you just want to stretch the mirror with the hotspot.
But if you want to type a figure into the tracker then it won't work because you are still actually adjusting the half width while displaying the value of the full with on the hotspot.

But to get around that just add this to the parameter script instead of what you had.
if GLOB_MODPAR_NAME = "mirror_widthper2" then
	mirror_width = mirror_widthper2*2
	PARAMETERS mirror_width = mirror_width
endif

if GLOB_MODPAR_NAME = "mirror_width" then
	mirror_widthper2 = mirror_width*0.5
	PARAMETERS mirror_widthper2 = mirror_widthper2
endif
This way whether you adjust the half width or the full width one will adjust the other.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Learn and get certified!