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.

Adjustable handle/node using GDL scripting.

Anonymous
Not applicable
Hello,

I am new to GDL scripting, I was wondering if anybody could assist me with adding an adjustable handle/node to a GDL object?

Any assistance would be greatly appreciated!

Cheers,

Jarrod
5 REPLIES 5
The theory:
http://gdl.graphisoft.com/reference-guide/graphical-editing-using-hotspots

Practice:
Analyze Cylinder and Cube objects.

Best Regards,
Piotr
Barry Kelly
Moderator
We would basically be re-writing the manual for you.

Here is a pretty good explanation in the GDL Centre...

http://gdl.graphisoft.com/gdl-basics/hotspots-graphical-editing

The best way to learn is to open the script of an object with editable hotspots to give you an idea of how they work.
Basically then you copy that script and substitute your own parameters for what you want to adjust.

Then if you have a specific question please post back with an image of what you want to do and/or a copy of the script you have tried for the hotspot.

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
Anonymous
Not applicable
Thank you both for your help and sorry if my question was quite general. I have found the 'Intro to Graphical Hotspots' in the GDL Cookbook to be very useful for understanding the basics, although it appears some of the syntax has since changed. For example 'hsid' seems to have been replaced with 'unID'. I guess my goal here is to create a simple object similar to a fill, in that the corners of the polygon shape are editable/movable. I am doing this to create an object that can be used as a boundary line for a site plan with future intentions to make the lines also visible in elevation/section view. However, that is probably too complicated for me at this point, so one step at a time!

So far I have only managed to create a straight line that has a graphical node at either end of the line:

unID = 1
unID=unID+1 !Base
HOTSPOT2 0,0, unID, A, 1+256
unID=unID+1 !Move
HOTSPOT2 A,0, unID, A, 2
unID=unID+1 !Vector
HOTSPOT2 -1,0, unID, A, 3
LINE2 0,0,A,0 !The Object

This is probably very basic, however it has taken me a while to actually understand the concept of each element (x,y, unID, param, flag [,disparam])

I am sure I will figure it out if I play around with it some more.

Thanks again for your help.
unID or hsID are just the variables - You can have your own name for it.
It is just a trick that adds +1 after every hotspot command so they have the id no and that number is unique.

Piotr
Barry Kelly
Moderator
As Piotr said the unID (unique ID) or hsID (hotspot ID) is just a unique number to identify the hotspot.
Each hotspot (in the entire script) needs to have a unique number.
You can even just type the number (1,2,3, etc.) but the unID+1 is just a way to ensure the number is unique and you don't have to check what you have used.

The co-ordinates are just your x and y values (z as well in 3D).
The 'moving' hotspot (flag code 2) will have the parameter you are adjusting as one of those co-ordinates.

The base hotspot (flag code 1) are the co-ordinates your want to measure the move from.

The vector hotspot (flag code 3) is a co-ordinate in the opposite direction to the point you are moving.
So if moving the x co-ord you would make x -1 here, if moving y co-ord you would make y -1.

The flag code tells the hotspot what it is (moving, base, vector) and has some additional values to hide (+128) some of the hotspots or +256 for hotspot 1 (base) will make the base an adjustable hotspot as well.

disparam (display paramerter) is optional and allows you to display another parameter other than the one you are adjusting - I wouldn't worry about this just yet.


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!