We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-11-21 06:45 AM
I created a label using textblock and richtext2.
Is it possible to freely move the part specified in the textblock with hotspot2?
It doesn't resize the text block, just move it where it's placed
Another method is to prepare two parameters (X direction and Y direction) to specify the distance you want to move.
I would like to know if it is possible to move freely with hotosopt2.
2022-11-21 06:53 AM
If your label has a pointer active, then you adjust the text position by moving the pointer nodes.
If your label does not have the pointer active, then you just move the text as you would standard text.
Or are you saying you want to adjust the width of the text box with a moveable hotspot?
Barry.
2022-11-21 07:28 AM
HI Barry
Thank you
No, it does not adjust the width of the text box.
I don't understand what it means if the label's pointer is active or not.
Attached is the script.
2022-11-21 08:12 AM - edited 2022-11-21 08:13 AM
to move freely an element created in gdl you have to blend 2 hotspots together :
uid = 1
HOTSPOT2 -1, 0, uid : uid = uid + 1
HOTSPOT2 1, 0, uid : uid = uid + 1
HOTSPOT2 hotspot_x, 0, uid , hotspot_y, 1+128 : uid = uid + 1
HOTSPOT2 hotspot_x, -1, uid , hotspot_y, 3 : uid = uid + 1
HOTSPOT2 hotspot_x, hotspot_y, uid , hotspot_y, 2 : uid = uid + 1
HOTSPOT2 0, hotspot_y, uid , hotspot_x, 1+128 : uid = uid + 1
HOTSPOT2 -1, hotspot_y, uid , hotspot_x, 3 : uid = uid + 1
HOTSPOT2 hotspot_x, hotspot_y, uid , hotspot_x, 2 : uid = uid + 1
where hotspot_x and hotspot_y are the x and y coordinates of the hotspot you'll use to move the textblock
2022-11-21 08:35 AM
Labels have pointers.
If it has a pointer, you just adjust the pointer nodes.
If it doesn't have a pointer, you just move the text.
What is it you are trying to move?
Barry.
2022-11-28 03:07 AM
Thank you JulienK
I think hotspot_X, hotspot_Y are local coordinates.
If hotspot_X and hotspot_Y are set with the world coordinates imported by the add-on, is it possible to move the text in the same way?
Is it possible to move the text written in world coordinates?
2022-11-28 04:30 AM
Wait, Add-on? If you explain your use case it might help. Are you trying to automatically define and label points of interest from a contractors supplied coordinate file?
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-11-28 05:55 AM
Thank You Lingwisyer
I am making a label for the opening with GDL.
Mark the opening with an X and draw the dimensions and ID near the opening.
I would like to move the label for that dimension or id with a hotspot.
The shape of the opening (whether circular or rectangular) and the positional information of the opening cannot be known without an add-on, so I created an add-on for that purpose.
2022-11-28 07:45 AM
Right. So you place label on a window, door or opening, and it will create a cross on it then read the ID as well as retrieve the dimensions via your add-on to be displayed at a user determined location that can be modified via a Hotspot.
Following the Hotspots created like how Julien as explained, you then use the same hotspot_x, hotspot_y to place your Richtext.
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-12-02 09:26 AM
Hi,
GDL hotspots always work with local coordinates, the origin is the object's origin.
The conversion to plan coordinates depends on the tool with which the library part works. In the case of labels use LABEL_POSITION[1][]
If you need to display coordinates to the user, GLOB_WORLD_ORIGO_OFFSET has to be added to handle cases when the plan contains large coordinate values.