BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

About building parametric objects with GDL.

Define Solid Fill

GDL Enthusiast
Hi GDL Coders,

I would like to define my own fills in a GDL object without having to rely on the locally loaded fill options. I have found online some examples of hard coded syntax fills as below:

!!!Define Fills (Start)
!===Fill Type 1: Solid
DEFINE FILL "FillSolid" 255, 255, 255, 255, 255, 255, 255, 255, 1,0,0
!===Fill Type 2: White
DEFINE FILL "FillWhite" 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0
!===Fill Type 3: Grey 25%
DEFINE FILL "FillGrey25" 85, 0, 170, 0, 85, 0, 170, 0, 1,0,0
!===Fill Type 4: Grey 50% !║
DEFINE FILL "FillGrey50" 85, 170, 85, 170, 85, 170, 85, 170, 1,0,0 !║
!===Fill Type 5: Tiled !║
DEFINE FILL "FillTile" 64, 192, 192, 192, 192, 192, 255, 255, 1,0,0 !║
!!!Define Fills (End)

In the above fill example, when I use the Define FillSolid

Fill FillSolid

I get a result that is a white fill that I cannot seem to change colour of regardless of what pen I select. The other defined fills #2-5 seem to work okay and changing the pen changes the colours. Could you advise what is wrong with the fill #1 that makes it just a whiteout?

Ideally I would just like to define in the GDL script, a hard coded 'solid fill' that I can change the pen colour of using the pen pallet. Often across multiple systems there are different fill patterns and I want to avoid relying on the user to have to define his solid fill each time.

Many thanks in advance,
There is hidden menu in ArchiCAD for GDL developers. You can find it in Work Environment settings. There is one command that saves file attributes as GDL. You can use this command to get your fills written on GDL - I think this is the best example how this system works.

However I do recommend to use Symbol fills instead of Vector, because symbol fills are converting into fills in PDF and helps to have files smaller (vector fills saved to PDF as lines and can make PDF really big - especially landscape plans, where big areas are covered with fill). With DWG it's opposite, but if you set fills/hatch conversion table - you are getting native hatches in AutoCAD.
Peter Baksa
A symbol fill definition disables background conversion in the object that defines it.

Unless you have to do something parameter-specific, I'd recommend transfering symbol fills between plans in XML format using the attribute manager.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!