Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

GDL
About building parametric objects with GDL.

missing last pens on the array parameter

gaba
Enthusiast

I wanted to simplify the handy object and use an array of pens instead of separate pen parameters. Unfortunately, such an array allows you to manually enter a pen 0, but does not accept a pen -1.

gdlpenarray.png 😕😕😕

"When you seek knowledge, you will eventually find it. Then you will become its source - until such time as you must seek it again."
AC 7 - 27 (28), Twinmotion | Windows 10 Pro for Workstations
Dell 7740 Xeon | 64GB | RTX 3000 6GB + LG 2560x1080
3 REPLIES 3
Laszlo Nagy
Community Admin
Community Admin

I guess this is a limitation of GDL. When the Pen parameter is a single parameter, the 0 and -1 values are available, but when you make it an Array Parameter, they are no longer available. I guess there must be some technical reason behind this. I wonder if @Peter Baksa can shed some light on this for us.

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
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
runxel
Hero

Funnily enough you can use "values "pen2x2" range[-1,255]" to make -1 and 0 available – but they will be at the beginning of the list! (so the whole pens are shuffled.... not a good workaround imho).

Other workaround is to program a GUI. With ui_infield{3} it works fine (-1 and 0 are available).

I'd say it is a bug that should get fixed.

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

I came across this "bug" because I simply didn't want to do GUI;
I think GS will fix it someday, after all it's just an INTEGER

"When you seek knowledge, you will eventually find it. Then you will become its source - until such time as you must seek it again."
AC 7 - 27 (28), Twinmotion | Windows 10 Pro for Workstations
Dell 7740 Xeon | 64GB | RTX 3000 6GB + LG 2560x1080