cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

AI-Powered GDL Generator

Ahmed_K
Mentor

🚀 AI-Powered GDL Generator – Would This Be Useful for You? 🤖📐

 

Hello everyone! 👋

 

We’re exploring the idea of an AI-powered tool that generates GDL code based on natural language descriptions. Imagine simply describing the object you need, and the AI instantly produces the GDL script—no manual coding required! 🏗

 

Potential Features:

Text-to-GDL Conversion – Describe an object, get a functional GDL script.

Live Code Suggestions – AI assists in optimizing and debugging GDL code.

GDL Library Enhancement – Generate parametric objects quickly for Archicad.

Smart Learning – The AI improves over time based on user input.

 

Before going further, we’d love your thoughts and feedback:

💡 Would this be useful for you?

💰 Would you consider paying for a tool like this?

🔧 What features would make it truly valuable?

 

We’re still in the early development stage, so your input would be incredibly helpful in shaping the future of this tool! Looking forward to your insights. 🚀

 

#Archicad #GDL #BIM #AI #Innovation

AMD Ryzen 9 3900X, 32 GB RAM, RTX 3080 10 GB
Archicad 27
Windows 11 professional
https://www.behance.net/Nuance-Architects
22 REPLIES 22
Hmooslechner
Moderator

Some Tests with Gemini3 - for those who can understand german - Gemini delivers functional Codes in komplex operations. I tried "to follow" an existing polyline with the Archicad-Goodies - polyline-addon. My goal is - to get "the enrolment" of an Polyline similar to a section-View with Z-Hights for later use in an 3D-Object.

The problem with the addon - it segments arcs in the Polyline and you get a much higher number of points - without any flag, if its part of a line or part of an arc

My idea to solve this - define a maximal distance between Polyline-Segment-Points. If its under - its an arc. Functional so far, but i made some logic errors in my own code.
Gemini - once got enough input - sendet me an functional code. Grok - told me, but couldn't.

 

https://www.youtube.com/watch?v=W5glbdq5gwk

 

There are some AI sites out there, which can translate an Youtube-Vid "on the fly"

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Hmooslechner
Moderator

A little warning..  Gemini is not perfect til now. it will produce functional code but does not Know common Problems with the GDL-Interpreter-Tester in Archicad..And does not learn from one User to another. If You work with it - let it explicit Know of this:

 

(Gemini wrote this in englisch for You)

Subject: GDL Tip: Solving persistent "Real types" warnings and Array Index errors

Hi everyone,

While scripting complex objects (specifically involving the Accessories Add-on and dynamic coordinate arrays), I encountered some stubborn errors regarding array indexing that I wanted to share a solution for.

The Problem:
Even when loop variables are logically integers, the GDL interpreter (especially in the PARAMETER SCRIPT) often throws warnings or errors such as:

  • "The use of real types can lead to precision problems"

  • "Cannot reference undefined index variable"

This happens even if the variable was defined previously, e.g.:

Gdl
 
i = 1
val = myArray[i] ! <-- Can still throw errors or warnings

The Cause:
The GDL parser is extremely strict, particularly regarding calculations performed near or inside array brackets. It often treats the result of a calculation or a loop variable as a Floating Point (Real) number by default. Since array indices must be strict Integers, this causes conflicts.

The Solution: Aggressive Casting with INT()
It is often not enough to convert the variable just once at the beginning. You must use the INT() command directly inside the square brackets of the array query. This forces the parser to accept the value as an Integer at that exact moment.

Code Comparison:

 Risky (prone to warnings):

Gdl
 
FOR i = 1 TO n
    ! Even if i is a loop variable, calculation results might be treated as Real
    idx = (i-1)*2 + 1
    
    ! This often causes the "precision problems" warning:
    val = coordArray[idx] 
NEXT i

 Robust (Best Practice):

Gdl
 
FOR i = 1 TO n
    ! 1. Cast the loop variable locally
    i_int = INT(i)
    
    ! 2. Cast the calculation result
    idx = INT( (i_int-1)*2 + 1 )
    
    ! 3. CRITICAL: Use INT() directly inside the brackets!
    ! This eliminates the warning completely.
    val = coordArray[ INT(idx) ] 
NEXT i

Since adopting this strict syntax ("Aggressive INT-Casting"), all precision warnings and unexplained index errors in my scripts have disappeared, and parameter stability (e.g., when geometry changes dynamically) is guaranteed.

I hope this helps anyone else who might be struggling with these specific GDL parser quirks!

 

end of Geminis warning.

 

There are several other solutions for this problem possible..

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia

for german-speakers the result:

 

diskussion with AI:
https://www.dropbox.com/scl/fi/g2wofm599hbhw86yxfu9d/Gemini3Pro-Diskussion.rtfd?rlkey=yeoabfhprinr0l...

 

The AC29EduAut-File:

https://www.dropbox.com/scl/fi/d44gkj0d69dzg3lt5bqnd/L-ngenschnitt-an-Polylinie.pln?rlkey=nwb03annq4... 

 

 

https://www.youtube.com/watch?v=c0FOZrVylcg

Does anyone know a site which translates Vids automatically? I'have seen some in the past but i don't find them now..

 

 

summary - you have to be good at GDL yourself -  for a successful use of the AI now - but i think this changes very quick..

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia