cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

GDL
About building parametric objects with GDL.
SOLVED!

Movable object along path

NWA
Contributor

Hi all,

with your help in my post (here) I was able to write an object with Hotspots to rotate and to move components of an object.

Something new that I would like to try is to make components of that object movable along a predefined path. In my example (see screenshot below) I would like to move the armchair along the edge of the carpet from the top to the right side.

The “3D Kitchen” from the Archicad library has that exact functionality, but I was not able to understand how it works, let alone reproduce it for my simple 2D object.

 

Can anyone hint me to some pointers or commands on how to achieve this modification?

 

Many thanks in advance.


move chair along path.jpg
ArchiCAD 26.5002
Windows 10 Professional
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
julienK
Advocate

There you go.

 

The trick is  in the parameter script. 

You have 2 parameters, chair position x and y that  must have different constraints depending on the side of the carpet the chair is on.  GLOB_MODPAR_NAME lets the script know when to change those constraints.

 

editing hotspot in the 2D script.

View solution in original post

3 REPLIES 3
Lingwisyer
Guru

If they are the same object, and they do not need to go around a corner, you can use a fixed x/y coordinate while the other is linked to your dynamic hotspot?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Solution
julienK
Advocate

There you go.

 

The trick is  in the parameter script. 

You have 2 parameters, chair position x and y that  must have different constraints depending on the side of the carpet the chair is on.  GLOB_MODPAR_NAME lets the script know when to change those constraints.

 

editing hotspot in the 2D script.

NWA
Contributor

Thank you both very much!

I finally managed to complete the object with all its functions. 🙂

ArchiCAD 26.5002
Windows 10 Professional