We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

Label which automatically assigns hotspots in the corners of the parent object

Anonymous
Not applicable
Hey! I am fairly new into GDL-programming, but I have little experience in another languages. I am trying to modify labels script, so it could draw a diagonal line from square-shaped objects corner to another corner.

Is this possible? I have seen a label which can return objects relative coordinates from project origin and write it as a string, so I thought this information could be used to tell the label to draw the diagonal line.

This would require:
- Relative coordinates of one of the parent objects corners
- Objects length in X-axis
- Objects length in Y-axis

So how can a label request these parameters from a parent object? I tried to search info from other places, but I am out of luck, so I thought if someone could give me a hand here.
I am doing this for my school project, so all the help would be very appreciated! Thanks in advance!
3 REPLIES 3
Anonymous
Not applicable
Here is the result I want to achieve. The label is associated with a floor finish object (not a slab).
Palawat
Advocate
I'm not sure if you can "request" the relative position of the parent object but you can use LABEL_POSITION to get the position of the label itself.

Assuming you made the floor finish object yourself, or know its geometry parameter, then you can use the n = REQUEST ("ASSOCLP_PARVALUE", expr, ... to get the value of the geometry parameter.

That should give you enough info to work with.
Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.
https://www.indigofigs.com
https://www.facebook.com/indigofigs
Peter Baksa
Graphisoft
Graphisoft
No, labels don't know the parent element's position.
This can only work if the user positions the label to a specific point of the parent.
If you want to label only a specific GDL object, you could try storing SYMB_POS_... globals into a parameter in the parent object, and getting it with REQUEST "ASSOCLP_PARVALUE" in the label.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest