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…
2025-01-27 10:23 AM
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.....
Solved! Go to Solution.
2025-01-27 02:22 PM
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.
2025-01-27
11:17 AM
- last edited on
2025-01-28
08:10 PM
by
Laszlo Nagy
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.
2025-01-27 01:00 PM
Hi there, thanks for this tutorial.
But I want not to pick a color, just a field with a custom RGB color;
I made this exmaple with colored pictures in my biblio.
But no way to make so, with custom RGB command ?
2025-01-27 02:22 PM
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.
2025-01-27 02:37 PM
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.