how to make editable GDL Script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-26 02:05 PM
hotspot2 0,0
hotspot2 a,0
PEN epn
LINE2 -0.5, 0.0, a, 0.0
PEN cpn
LINE2 0.0, 0.0, -0.4, 0.4
LINE2 -0.4, 0.4, 0.4, 0.4
LINE2 0.4, 0.4, 0.0, 0.0
DEFINE STYLE "AC_STYLE_1" "arial",
100*tsize/a_, 7, 0
pen tpn
SET STYLE "AC_STYLE_1"
C=""
C=str(int((y~*100)+.5)/100,3,2)
TEXT2 0.0, 0.377143, "C "+C
this is my script. i want to make it auto editable. my c value generate automatically when i copied an object.
anyone please help me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-26 02:42 PM
Check in the GDL Reference Guide the "GRAPHICAL EDITING USING HOTSPOTS" section that talks about it.
There are also some examples here on the forum if you search for them. It is also possible to open a GDL Object in ArchiCAD that has this capability and check its 2D Script and 3D Script to see how it was achieved in these default Library Objects.
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-26 03:45 PM
It will show the 'Y' value (height in elevation) and changes automatically as you drag it or place new objects.
What is it exactly that you need help with?
Barry.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 04:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 04:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 06:16 AM
Then create a text parameter "C" in the parameter list.
Now in your object you can type any value you want - but it will not change automatically as you move the object.
hotspot2 0,0
hotspot2 a,0
PEN epn
LINE2 -0.5, 0.0, a, 0.0
PEN cpn
LINE2 0.0, 0.0, -0.4, 0.4
LINE2 -0.4, 0.4, 0.4, 0.4
LINE2 0.4, 0.4, 0.0, 0.0
DEFINE STYLE "AC_STYLE_1" "arial",
100*tsize/a_, 7, 0
pen tpn
SET STYLE "AC_STYLE_1"
!!C=""
!!C=str(int((y~*100)+.5)/100,3,2)
TEXT2 0.0, 0.377143, "C "+C
If you want the best of both worlds you can add a boolean (on/off) parameter to switch between automatic and maual input.
Create a boolean parameter called "auto_input".
Also create a text parameter called "manual_text"
Then change your script to this.
hotspot2 0,0
hotspot2 a,0
PEN epn
LINE2 -0.5, 0.0, a, 0.0
PEN cpn
LINE2 0.0, 0.0, -0.4, 0.4
LINE2 -0.4, 0.4, 0.4, 0.4
LINE2 0.4, 0.4, 0.0, 0.0
DEFINE STYLE "AC_STYLE_1" "arial",
100*tsize/a_, 7, 0
pen tpn
SET STYLE "AC_STYLE_1"
if auto_input = 1 then
C=""
C=str(int((y~*100)+.5)/100,3,2)
else
C = manual_text
endif
TEXT2 0.0, 0.377143, "C "+C
Now in the parameters you will have a switch where you can change between automatic or manual input.
Barry.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 06:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 08:09 AM
a applied code it was working but when i merge with my existing code it will generate error... on two lines
if auto_input = 1 then
TEXT2 0.0, 0.377143, "C "+C
... now what should i do ? want to see mine full code ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-27 08:23 AM
You will need to ZIP it otherwise you won't be able to attach it.
Barry.
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