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

Hotspot/Node to adjust a parameter??

JGoode
Expert
I am looking to add a hotspot/node to my object to make it so that the user can adjust a variable with it. Any help would be much appreciated.

Thanks.
ArchiCAD 23

Windows 10
3 REPLIES 3
Barry Kelly
Moderator
What sort of variable - length, boolean (on/off), value list?

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
JGoode
Expert
Barry wrote:
What sort of variable - length, boolean (on/off), value list?

Barry.
Length
ArchiCAD 23

Windows 10
Barry Kelly
Moderator
JGoode wrote:
Barry wrote:
What sort of variable - length, boolean (on/off), value list?

Barry.
Length
That is just a standard hotspot.
Assuming you want the hotspot to stretch in the 'x' direction then you need the following code for 2D script and 3D script.
'distance' is the parameter you want to stretch.
!!Stretchy x – 2D
HSID = HSID+1
hotspot2 0, 0,HSID, distance, 1+128		!base
HSID = HSID+1
hotspot2 -1, 0, HSID, distance, 3		!reference
HSID = HSID+1
hotspot2 distance, 0, HSID, distance, 2	!moveable


!!Stretchy x – 3D
HSID = HSID+1
HOTSPOT 0, 0, 0,HSID, distance, 1+128		!base
HSID = HSID+1
HOTSPOT -1, 0, 0, HSID, distance, 3			!reference
HSID = HSID+1
HOTSPOT distance, 0, 0,HSID, distance, 2		!moveable

You can use and ADD command before this code to position the hotspot or you can add the co-ordinates into the code.

You can also use a ROT command before if you want the hotspot to stretch in a different direction (i.e. not along the x-axis). Or if you want to stretch along the y-axis it is just a matter of swapping the variable in the script to the 'y' co-ordinate - then you don't need the ROT.


My understanding of hotspots is as follows ...

The BASE hotspot is the starting point from where you want to stretch the movable hotspot - where you want to measure from.
The REFERENCE hotspot is the direction opposite to where you want to stretch.
The MOVEABLE hotspot is the one you want to move and uses the variable you want to alter.

They should all have unique IDs

They all share the same parameter reference (the parameter you want to stretch)

And they all have their own flag which nominate the type of hotspot they are (base, reference, moveable).


There is a little more to them which you may be able to make sense on from the GDL reference or if you have more specific questions then ask here with examples of what you are trying to do.

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