ArchiCad Curtain Wall – Custom Panel

So far I have been working on an ArchiCad project for a client of ours. Apparently it is extremely tricky to do anything with the archicad curtain wall tool.

Similar in Revit the curtain wall tools are very much in the starting blocks when it comes to usability and user-friendliness. For Revit there is a bustling community of developers actively working and modifying the tool using various plugins to make it better suit their needs.

In ArchiCad the main programming language is (next to C# for plugins) GDL. Or Geometric Description Language. It turns out however that in the User Reference Guide there is no mention (or very little) on the usability of curtain walls.

ArchiCad Curtain wall code

Quite some trial and errorĀ  was necessary to make things work. If you decide to go the hard route and design a custom panel in GDL, here is some code that you might find useful:

cprism_ mat1, mat2, mat3, 4, panel_thickness,

The above piece of code makes sure your panel follows the scheme. You can then set several scheme settings and save them as favorite settings so you don’t have to redo the work over and over.

Also more interestingly for us and our client, these favorites can be exported to a .prf file that you can load in to another project entirely.

AC_PanelCoords[4][4] stores the coordinates of each and every panel. So as you call them in this way in (for example) a cprism_, you can then use this framework to make your own custom panel.

For my own I have declared in my master script the following:

!This makes it follow the grid

And in my 3D-script:

cprism_ mat1, mat2, mat3,29,zzyzx,

..It can get a little complicated..

And if only it was this simple..

There is a 50 mm offset using the panel coordinates that I have no idea (so far) where it is coming from. Probably the archicad curtain wall doesn’t give the exact coordinates or there is some setting that is switched on somewhere that I haven’t been able to turn off.

However it seems to only affect on the 2D representation of the object. The line I commented out actually fixes this and shifts everything 50 mm to the left, alligning everything perfectly.


In the 2D view it seems like the first panel and the second overlap. However as we see from the 3D this is not the case. So very interesting indeed that a simple “project2” command would show these to be intersecting.

My hunch is that this is caused by some bug or error in the AC_PanelCoords somewhere. Or then a fault in my code, which is also highly likely!

2D representation

Secondly another thing that has me ripping out my hair is, as mentioned above, the fact that a projected view of the acrhicad curtain wall is not the same in the 3D view.

Case and point:

archicad curtain wall

How is it possible that the projected view of this panel in the curtain wall is a projection of it on its side?

This has to do with how the archicad curtain wall tool interprets the orientation of the panel as an object itself. The 2D projection then takes the information of the object in its 3D view representation rather than its view in the curtain wall itself.

Meaning that to get the panel to show up as upright when used in a curtain wall, you need to turn the object when modelling in GDL in such a way that it lays flat on the ground.

Only in this way (I have found so far) will the panels show as upright in the archicad curtain wall tool. Then the 2D representation (if you project) takes its information from the GDL version of the standalone object.

Extremely frustrating and most likely a bug in at least Archicad 18. Don’t know if this has been fixed in later versions of archicad.


One workaround that I have found so far is to change the projection_code from 3 (for topview), to 4 (being side-view).

Your code will then be:

project2 4, 270, 32

Which basically is the projection from the side, used as projection from plan-view.

Logical, right?

Handling Corners

Our customer wanted a solution that would be as true to the Archicad curtain wall tool as possible. As such the way we handle corners needed to be similar.

Right now my code does this:

It lines up well, but let’s face it, not a pretty corner now is it.

When taking a look at what ArchiCad had to offer I found that they have a separate panel in their curtain wall tool to handle corners.

As a result I added the next few lines of code to my custom panel in an effort to make the behavior more like the standard ArchiCad ones.

In the master-script I have added the following:

if behaviourvalue = “Normal” then
!This makes it follow the grid
if behaviourvalue = “Corner” or behaviourvalue = “Kulma” then
!Add thickness B of panel to the end to make the corners square

In practice..

In my interface script I have a dropdown with 3 values; Normal, Corner and Stretchable.

If “Normal” is chosen, the panel behaves as it should. It follows the grid as is defined by the user and doesn’t do anything extra.

However if you select the curtain wall and select the “Edit in 3D”-mode, individual panels become clickable.

In order to make a square corner, all the user then has to do is click one of the panels. Then he/she needs to select “Corner” from the dropdown. Ultimately the code works in such a way that it will add the thickness of the panel (in my case read in as “B”) to the end of the panel.

The panel “overshoots” the grid by a measure of “B”. As such the corners are squared.

As the code is placed in the master script there is no need for me to update the 2D script. It takes the rules automatically from the master script.

Frame objects

Lastly the archicad curtain wall tool allows you to add in a lot more than just custom panels. In GDL you can easily define mullions, transoms and border frames.

Mullions are the listings that go in a vertical direction, while transoms divide your panel in a horizontal direction. Border frames border off your wall.

Check this article later for more information on those.

Also if you notice something off or something strange, no-one is perfect :). Please let me know in the comments below so I have a chance to fix it!

Here is the original thread

Leave a Reply

Your email address will not be published. Required fields are marked *