GDL
About building parametric objects with GDL.

HOTSPOT2

Nami Furuta
Booster

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.

11 REPLIES 11
Barry Kelly
Moderator

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.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

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.

 


gdl1121.PNG
julienK
Advocate

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

Labels have pointers.

 

BarryKelly_0-1669016003511.png

 

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.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

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?

Lingwisyer
Guru

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 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 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.

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 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

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.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!