License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

GDL
About building parametric objects with GDL.
SOLVED!

Grid object for 2D details

Hallo people,


My problem is that when I detail in 2D I have to use lines and labels to create Grid elements.
My idea was to make a 2D grid element object that has t he following parameters
- Stretchable line with adjustable linetype and pen. Must be hotspotted.
- Circle at the end of the line with adjustable diameter
- Text in the circle with adjustable text, typeface and size

I managed to make it work, beside the stretching part.

Basically the lenght can be adjusted but only through the parameter in the settings. Somehow I can't get the stretch dots to appear.

Could someone please assist?

My parameters:
GL  Lenght 1000.0
DC Diameter Circle 15.0
TG Grid_naam A
TF  Lettertype ArialWesters
TS  Text size in mm 2.0
Pe   Pen 1
Li Linetype 201

Here's my code:

hotspot2 0,0
hotspot2 0,DC
hotspot2 0,-DC
hotspot2 DC,0
hotspot2 -DC,0
hotspot2 0,GL


DEFINE STYLE    "AC_STYLE_1" TF,    TS*1000,    5,  0
SET STYLE "AC_STYLE_1"
MUL2 1 - 2 * SYMB_MIRRORED, 1
rot2 -symb_rotangle
TEXT2 0, 0, TG
del 1

CIRCLE2 0, 0, DC

pen Pe
set line_type li
unID = 1
LINE2 0, DC, 0, GL
hotLINE2 0, DC, 0, GL,unID :    unID=unID+1

pen 28
set line_type 21

 

StefanVidenov_0-1749643048735.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
cuba
Expert

Hallo Stefan,

 

Voeg een 'editable' hotspot toe aan je script:

 

Add an 'editable' hotspot to your script

 

unID=1
hotspot2 0, 0, unID, GL, 1 + 128: unID = unID + 1
hotspot2 0, GL, unID, GL, 2: unID = unID + 1
hotspot2 0, -1, unID, GL, 3: unID = unID + 1
 
Succes!
Groeten
Apple M1 Max 32 GB Ventura
AC27

View solution in original post

3 REPLIES 3
Solution
cuba
Expert

Hallo Stefan,

 

Voeg een 'editable' hotspot toe aan je script:

 

Add an 'editable' hotspot to your script

 

unID=1
hotspot2 0, 0, unID, GL, 1 + 128: unID = unID + 1
hotspot2 0, GL, unID, GL, 2: unID = unID + 1
hotspot2 0, -1, unID, GL, 3: unID = unID + 1
 
Succes!
Groeten
Apple M1 Max 32 GB Ventura
AC27

Dat doet het prima, maar waarom voeg je 3 hotspots toe :? Alleen die bij 0, GL werkt.

 

That works fine, but why add 3 hotspots :? Only the one at 0, GL works.

cuba
Expert

Dit is een rekbare hotspot, dit bestaat uit 2 punten + een vector

Het eerste punt is de basis 0,0 (het punt van waar je de afstand wilt bepalen)

Het tweede punt is het coördinaat van het punt dat je versleept

Het derde is de richting (-1) waarin je 'meet'

 

This is a stretchable hotspot, this consists of 2 points + a vector

The first point is the base 0,0 (the point from which you want to determine the distance)

The second point is the coordinate of the point you are dragging

The third is the direction (-1) in which you are 'measuring'

Apple M1 Max 32 GB Ventura
AC27