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!

User Interface Script - Custom colored field?

Andreas81ch
Advisor

Hi there, is it possible to do a colored square (with R, G, B) or so in the "UI Script" ?

I found only that you can put a picture from the bib, or de Pre-picture from your object in the script.

 

In the GDL reference guide, there it is;

UI_COLORPICKER "redParamName", "greenParamName", "blueParamName", x0, y0 [, width [, height]]

But I don't unterstand that to do......

 

Otherwise, the reference guide is not bad, but some script example, I don't see "preview example = result".....

> all for UI_ scripts.....

 

 

 

 

 

ArchiCAD v6.5 - 28 (CHE Swiss Edition) - macOS / WIN (Switzerland / Schweiz)
Workstation office specs: mac OS sequoia 15.5, Apple M2 Max, 64 GB RAM
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

As far as I know, it is not possible with a UI-Command to create a colored field.
In these cases I always use the UI_PICT command and place colored pictures as you did.

Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

View solution in original post

4 REPLIES 4
MF BIM
Enthusiast

Hi @Andreas81ch ,

 

If I understand your request properly, UI_COLORPICKER does exactly that

 

In your Parameters List, you should have 3 parameters of Real type :

- "Red" (or any name you want)

- "Green" (or any name you want)

- "Blue" (or any name you want)

 

In the Parameter script (it's not necessary but it's better)

 

 

values "Red"   range[0, 1]
values "Green" range[0, 1]
values "Blue"  range[0, 1]

 

 

 

In the Interface script

 

 

xStart	= 5
yStart	= 5
width	= 40
height	= 40

UI_COLORPICKER "Red", "Green", "Blue", xStart, yStart, width, height

 

 

 

On mac, this should give you this result (a clickable square of 40x40 px placed at 5, 5 in the UI). Second picture is what you get when you click on the square.

Capture d’écran 2025-01-27 à 11.10.43.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Capture d’écran 2025-01-27 à 11.10.46.png

 

 

https://mfbim.fr | https://youtube.com/@mfbim | My GDL course on Udemy, try it !
AC24 FRA 7600 - AC26 FRA 4027 | MacBook M1 Pro

Hi there, thanks for this tutorial.

 

But I want not to pick a color, just a field with a custom RGB color;

UI_Question custom color field.png

 

I made this exmaple with colored pictures in my biblio.

But no way to make so, with custom RGB command ?

 

 

ArchiCAD v6.5 - 28 (CHE Swiss Edition) - macOS / WIN (Switzerland / Schweiz)
Workstation office specs: mac OS sequoia 15.5, Apple M2 Max, 64 GB RAM
Solution

As far as I know, it is not possible with a UI-Command to create a colored field.
In these cases I always use the UI_PICT command and place colored pictures as you did.

Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

Ah I didn't get it then, my bad. I do not believe that what you ask is possible but maybe there's something I don't k,ow.

https://mfbim.fr | https://youtube.com/@mfbim | My GDL course on Udemy, try it !
AC24 FRA 7600 - AC26 FRA 4027 | MacBook M1 Pro