Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.
Monday
- last edited
Tuesday
by
Laszlo Nagy
Hello!
Id' like to extract the RGB values I've set on graphic override for the colors of different "composite" building types (walls/floors/roofs) and put the in a schedule. Now I can easily put the 2D Plan Preview of the elements where I can see the colors but I'd like to follow it with the values of RGB for each color. Is there a way to do this? Thank you in advance.
I'll attach a screenshot of what I'd like the final result to be, in it you can see I've created 3 parameters each for RGB.
Tuesday
- last edited
Tuesday
by
Laszlo Nagy
Update:
So I asked Le Chat AI to do this and it basically said that I have to write a GDL script. I asked to write it and below is what it spit out. The script isn't working, does anybody know where the error is? Script below:
! Parameter Script
! Function to get RGB values from the cut fill pen color
call getRGBValuesFromCutFillPen, penIndex, red, green, blue
dim penRGB[3]
penRGB = GETPEN(penIndex)
red = penRGB[1]
green = penRGB[2]
blue = penRGB[3]
end
! Get the cut fill pen index based on element type
if GLOB_TYPE = "Wall" then
penIndex = WALL_CUT_FILL_PEN
elseif GLOB_TYPE = "Slab" then
penIndex = SLAB_CUT_FILL_PEN
elseif GLOB_TYPE = "Roof" then
penIndex = ROOF_CUT_FILL_PEN
endif
! Initialize RGB values
red = 0
green = 0
blue = 0
! Get RGB values
call getRGBValuesFromFillPen(penIndex, red, green, blue)
! Assign RGB values to custom properties
GS_PROPERTY_NAME = "R"
GS_PROPERTY_VALUE = red
GS_PROPERTY_NAME = "G"
GS_PROPERTY_VALUE = green
GS_PROPERTY_NAME = "B"
GS_PROPERTY_VALUE = blue
! End of Parameter Script
Tuesday
GDL is for objects or labels (but you can't schedule labels).
What are you scheduling?
Fills, zones, slabs?
Barry.
Tuesday
Hello Berry,
Thanks for your time!
I'm scheduling walls, slabs and roofs.
E
Tuesday
The 2D preview will show you a sample preview of the walls, slabs, etc.
If the schedule view has a graphic override in the settings, then you will see the preview based on that override.
But I don't think there is any way to get the RGB values shown in the preview if that is what you are after.
Barry.
Wednesday
Yeah you're right, I want the RGB values of the pens to show as fields in the schedule. I tried to yesterday but there really seems to not be a solution for it. Which is strange since the RGB values are "parameters" of the PEN, so in theory you should extrapolate them in some way.
Anyway, thank you for your time and consideration Barry.
Wednesday
In GDL you can request RGB_OF_PEN, but that will only help you in an object.
Unfortunately you can't even schedule the pens used for slabs, walls, etc., let alone the RGB values of those pens.
Barry.
Wednesday - last edited Wednesday
You can schedule the Pens with the Component schedule since one of the fields available is the "Construction Material/fill section pen". In a simple environment where you don't have different types of composite walls/slabs/roofs that could work since you can use (one fill section)=(one pen), but when you have a wall with different layers then it lists all the pens of the different materials that constitute the wall. It doesn't read the pen of the graphic override, and yeah, still haven't figured out how to extrapolate the RGBs and at this point I'm probably going to give up.