Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

Here is the result I want to achieve. The label is associated with a floor finish object (not a slab).

Palawat
Newcomer
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.
Cheers,

Archicad 24 Solo, 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

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!