BIM Coordinator Program (INT) April 22, 2024

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

GDL
About building parametric objects with GDL.
SOLVED!

GDL Hotspot rotation

NWA
Contributor

 

Hello all,

I have recently started out with GDL scripting and try to improve step by step by editing a general collection of 2D furniture objects. So far I managed to work with simple commands like Glob Scale and different varients of the "IF" command. 

The next step would be to modify my objects so it is possible to move and rotate different components via hotspots. I added two screnshots to clarify what my intentions are. 

 

Can anyone hint me to some pointers or commands on how to achieve these modifications? 

Many thanks in advance. 


Chair Move.PNGChair Rotate.PNG
ArchiCAD 26.5002
Windows 10 Professional
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Google

gdl cookbook david nicholson cole

 

There is the version 3.1 PDF and large parts of the 4.0 that were made available by Nicholson Cole himself. The print book if you find it anywhere is a great resource too for your first months/years with GDL. 

 

The sections you are looking for specifically are the two “Graphical Hotspots!” in 4.0. In case it helps with the PDF search, the file names are

CB4_150_G_HotspotIntro.pdf

CB4_160_GHS_examples.pdf 

View solution in original post

5 REPLIES 5

Gdl manual is under pdf help. It has the information on hotspots 

NWA
Contributor

Thank you for your suggestion. I already looked the general GDL manual up but still I couldn't figure it out. Graphisoft provides some tutorials (like this one: https://gdl.graphisoft.com/gdl-basics/hotspots-graphical-editing) yet I'm not able to understand the overall concept of the hotspot function. Like how can I apply the Hotspot rotation to for example a whole object, like the chair in my screenshot?

 

Many thanks. 🙂

ArchiCAD 26.5002
Windows 10 Professional
Jorge_Arreguin
Booster

ok, what you need to do is create a variable of distance in parameter for example "movex" then add a line in the script before draw the object something like "add2 movex,0" , and create the hotspot dynamic (pink one) to move it on the screen

hotspot2 0,0,1,movex, 1+128  !1 is for base point and 128 is for hide it

hotspot2 -1,0,2,movex,3 !3 this reference create a vector always oposite where you will move

hotspot2 movex,0,3,movex,2  !is will be the pink dot

 

Jorge_Arreguin
Booster

for rotation create a angle variable in Parameters with the name turnZ

hotspot2 0,0,4,turnZ,6+128        !this is the rotation center hide

hotspot2 1,0,5,turnZ, 4               !this is base point where star your rotation

hotspot2 0.9*cos(turnZ), 0.9*sin(turnZ),6,turnZ,5    !this is the moving angle 

 

Solution

Google

gdl cookbook david nicholson cole

 

There is the version 3.1 PDF and large parts of the 4.0 that were made available by Nicholson Cole himself. The print book if you find it anywhere is a great resource too for your first months/years with GDL. 

 

The sections you are looking for specifically are the two “Graphical Hotspots!” in 4.0. In case it helps with the PDF search, the file names are

CB4_150_G_HotspotIntro.pdf

CB4_160_GHS_examples.pdf 

Learn and get certified!