BIM Coordinator Program (INT) April 22, 2024

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

About building parametric objects with GDL.

Changing Label position based on it's parameter.


I am trying to create a label which changes it's position based on the co-ordinate values (global) defined in it's parameter.


For example, if the label is in a random position with initial parameters:




and I change it to Global_X=3, Global Y=5, the label should move to global (3,5).

The initial position of the label does not matter i.e. when the user clicks on the element, the label can be placed anywhere but it has to move based on the global coordinates defined within it's parameters.

Can this be achieved ?
If it can, which command would help me achieve it ?


Thank you.


As far as I know, the only thing in GDL that can reference the Global Origin are textures through the COOR commands. If there is anything, you might be able to find it in the Survey Point object.


Correction: for 2D, you can use the globals Symbol_Pos_X and Symbol_Pos_Y. which will give you the objects relative position from the origin.




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

Thank you very much for your reply.

I have already tried that and I get 0 no matter what.
I just tried it in a simple way as follows:



Regardless of where I click, I always get zero.


Barry Kelly

I'm not quite sure what you are trying to do, but as far as I know, the label position is stored in a GLOBAL variable.

This is from the GDL manual.




It is a 3x2 array of the x & y coordinates of the leader arrow.

If you don't have the leader line on, I think it just uses the x & y coordinates of the first array value.


You should see those variables used to position the text in your label, so I am guessing you could manipulate those values.

i.e add values to them or simply use your own instead of those.



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

@Eshanta It does depend on what you are trying to do as to how you process the data points mentioned by @Barry Kelly. I have created labels that use parameters to position the text relative to the click / insertion point but the leader line on/off value will disrupt can disrupt what you are trying to achieve. Look at some of the GS label library objects to see if they help. The SYMB_POS_X & Y values and the data points will be important references in your GDL coding.  

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Learn and get certified!