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

Moveable Hotspot automatically jump back

Jochen Suehlo
Moderator
I try to make a script with a moveable hotspot, that shall jump back automatically.
It should behave like a bell button: push the hotspot forward, then an action happens (another Parameter is changed), after that the button should jump back in the zero position.

If I try to do it, either the button cannot be pressed, then no action happens or the buttons stays in a non zero position after pressing and parameter change and only a new GLOB_MODPAR_NAME could bring it back to zero.

Any ideas or experiences?
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
10 REPLIES 10
Barry Kelly
Moderator
I know what you are trying to do and have not been able to do it myself either.
I have done this with an on/off switch in the parameter list and it works fine there.
Turn the boolean switch on (one) and other parameters change and then the switch resets back to off (zero).
But as soon as you try to link a hotspot to that then the hotspot won't move and the parameters don't change.

The only solution I can think of it to link the change of parameters to the change in the value of the hotspot.
That way no matter how the hotspot is set as soon as you change it the other parameters you want will change.
The hotspot stays where you leave it but the next time you change it again the other parameters change.

Just tested and yes it works.
You just have to put up with the fact that the hotspot doesn't snap back.

If any others have any ideas it would be appreciated.

Attached is an object I use to keep track of when out template gets updated.
The original parameter (Update drawn date) works and resets back to "Off" automatically.
I have added a hotspot that will also reset the date and time ever time it is moved but I can't make this to automatically reset bac to the "Off" position after use.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Joachim wrote:
I try to make a script with a moveable hotspot, that shall jump back automatically.
It should behave like a bell button: push the hotspot forward, then an action happens (another Parameter is changed), after that the button should jump back in the zero position.

Any ideas or experiences?
You could nove your hotspot from the same inverse distance.

In this exampe, the hotspot is the center of a spiral.
Moving it up, number of revolutions increase,
Moving it down, it decrease.

The hotspot always returns to the centre of the spiral.

	!!! -------- Number of Revolutions ----------
	add2 0, -nTurn
	hotspot2  0,  0    , uid, nTurn, 1+128 : uid = uid+1    ! base      
	hotspot2  0, -1    , uid, nTurn, 3     : uid = uid+1    ! ref    
	hotspot2  0,  nTurn, uid, nTurn, 2     : uid = uid+1    ! moving
	del 1
Jochen Suehlo
Moderator
What I am trying to do, is to move entries of a list one position up and down.
I have done this in the User Interface by one checkbox up, one checkbox down for each line. When I click on a checkbox, the entry of the line moves up (the array entry) and the entry that was above, moves one line down.
This works without no problems.

But when I try to transfer this principle (moving of array entries one field up or down), it works as well, but I cannot set the hotspot back to zero like the Parameter of the Checkbox. If I do this by PARAMETERS, there will be no movement at all. I just do it by clicking on another Hotspot twice to get a new GLOB_MODPAR_NAME event that can cause the hotspot to get its value back to zero. But this is not satisfying.

Olivier, your suggestion, does not work, because the parameter value is still not zero (what I am needing). I think, there might be a trick with PARAMETERS and GLOB_MODPAR_NAME.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
ztaskai
Graphisoft Alumni
Graphisoft Alumni
2 quick comment without actually solving anything:

1. I'd prefer ui_pict_button or ui_infield{3} method 6 to a simple checkbox.

2. Try to stretch a placed Armchair 01 from AC Library 13 to more than 2x2 meters. Then you'll see some triggering hotspots. (Sorry for the spoiler...)

Regards,
Zsolt
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Fabrizio Diodati
Graphisoft Alumni
Graphisoft Alumni
Kedves Zsolt,

Great: I like it!
I will implement this issue on my next objects...



Friendly
Fabrizio
Fabrizio Diodati
Graphisoft Italy Srl | Via Rossignago 2/A Spinea Venezia 30038 Italy
Jochen Suehlo
Moderator
Zsolt,
you mean the tic-tac-toe game on "Armstuhl_2 13" in german library?
Nice gimmik!

The object must work in AC 10, so both UI metods are too new.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Yes, I was sure you'd like it 🙂

(I'm really sorry for you dealing with AC10...)

Regs,
Zsolt
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
ztaskai wrote:
2. Try to stretch a placed Armchair 01 from AC Library 13 to more than 2x2 meters. Then you'll see some triggering hotspots. (Sorry for the spoiler...)
Ahh, I can see the true reason teamwork2 was introduced - networked tic-tac-toe! Quality!
Anonymous
Not applicable
Joachim wrote:
Olivier, your suggestion, does not work, because the parameter value is still not zero (what I am needing). I think, there might be a trick with PARAMETERS and GLOB_MODPAR_NAME.
I was afraid that it was not so simple, or to misunderstood the question. Sorry, I'm out of ideas.

On other hand, I have quite the same object as Barry.
A boolean parameter in the UI allows date and time to remain fixed (Off), or to update (On),
(GLOB_MODPAR_NAME and parameters, as you said). It works fine.

Except if I put a graphical hotspot for this boolean parameter.
Just touching the hotspot, or at each rebuild and regenerate, date and time update, no matters if the parameter is Off.

Weird. I avoid to use hotspot switch in this situation. Just UI.