We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

What do you guys write gsm/gdl scripts on?

Jack D
Booster

Hello!

 

I'm pretty new to writing gsm and gdl stuff and I'm trying my hands on it to help out in the firm. The guy who does the scripting, writes it directly on Archicad. Which kinda baffles me. No intellisense, no syntax highlighting, no code snippets. It's like I've regressed back to 1990s. 

 

So I've found an add-on on vscode but it doesn't read gsm and seems pretty buggy from the github documentation. I'm wondering (and kinda certain), if someone has created an addon for stuff like sublime, notepad ++ or vs 2022, to easily script and debug these kind of files. That said I'm also wondering what do you guys use and how do you go about it.

 

Side note, I'm more familiar with JS, and python for web dev... hence why I'm asking about these text editors and IDE.

thanks and I hope there's a dev friendlier way of scripting gsm/gdl stuff. 

 

28 REPLIES 28

I've been coding GDL full time for about 15 years now and I agree it would be nice to have a more modern editor. I manage fine because GDL is where I started my coding journey.

It was only a few years ago that I started using Python and JS and discovered that it is a real pleasure to work with these languages in VS Code with all the efficient modern function. I could imagine being far more productive in my GDL code if the editor was similar.

I definitely do NOT like the idea of coding in another platform and then having to bring it into Archicad to test. As Lingwyser found with Sublime, I would get extremely frustrated by this as I am constantly going back and forth between the GDL code and the object.

Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
MetalFingerz
Advocate

It's so weird that even a simple line numbering isn't implemented.

 

ALLPLAN has a gdl editor (SmartParts editor) that is light years ahead of Archicad's : https://help.allplan.com/Allplan/2021-0/1033/Allplan/index.htm#73531.htm

 

 It has :

- line numbering

- syntax highlighting

- interactive reference guide with command and graphical info that changes following what you're highlighting (!!!)

- macros and pictures management

- translation management

😵

At some point I will make some videos, it's been on my mind.

 

I actually don't keep any of my stuff to myself. Sometimes there are not active links but I try to give all objects that are not still in heavy development out for free.

I just remove links when nobody asks questions lol

Sometimes I think they are ready and then I find bugs that make it so I have to not release them.

On some occasions I've even posted my library in it's entirety.

 

What object would you like to see first, maybe I'll do a video today.

 

Sublime GDL (https://github.com/runxel/GDL-sublime) and gdlnucleus (https://gdlnucleus.com/) have implemented the XML Converter, so there is no need to copy and paste. Only run the BUILD process and F7 (or other shortcut) and you are in Archicad with the updated gsm.
I think that GS easy could implement this in GDL extension for Visual Studio Code (gsm to HSF and back)

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

But hey...we have Structural....and MEP...and....well...

 

When talking about object editors I've played a bit with Bricscad https://youtu.be/e5GjX33G-k8

AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.

Yeah I totally agree with you! I just realised I've opened a can of worms with this topic but I'm still baffled they haven't done anything to gdl for this long. I said earlier Flash had some level of syntax highlighting. That was back in early 2000 when all i wanted was to make a stickman game as a kid. 

 

I kinda wish they sort this now than later but seems like the GS representative said it'll be in AC27, but the way he phrased it seems like never.

Zsuzsanna Bori
Graphisoft
Graphisoft

Hi! 

As a Graphisoft GDL developer myself, I recommend using our VScode extension as it is continuously developed by us. You can find it here: GDL - Visual Studio Marketplace 

Feel free to give us recommendations on what to add to the current features.

As someone mentioned before me, syntax highlight for the GDL editor in Archicad is in progress, I hope we can release it soon (AC27 or later...). In the meantime, even my own workflow is copy-paste between VScode and AC, it's not the best, but I got used to it.

Jochen Suehlo
Moderator

As I wrote above: Wouldn't it be easy for Graphisoft to implement the GSM to HSF and HSF to GSM convert routine into her GDL extension for Visual Studio Code like the 2 examples that are existing for Sublime Text?

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
runxel
Legend

Late to the party but I'd really like to chime in.

As most of you know I do a lot of scripting – and thus of course I loathe the lacking environment. I don't need to reiterate why the built-in editor is crap.

Because of my own needs I developed the plugin for Sublime Text (as per signature). I was staggered as well when I discovered nobody has done that before.

With HSF luckily Graphisoft has given us a wonderful workflow. I heavily disliked the XML way, just because language embedding feels always weird to me. The HSF approach is much cleaner and also behaves much better with version control systems like Git. And yes, all my code lives in Git.

With my plugin there is a direct link to the LP_XMLConverter, so no need for copypasting orgies. For some time now I also use VSCode. It's a great editor with rapid development. The official addon from Graphisoft lacks the link to the converter, true, but that's not really an issue. I've made a build system in half an hour – see my workflow below. Of course it helped I had done it before for my Sublime Text plugin. [0]

If you have a certain proficiency in GDL you can write larger batches of code before you'll need to test it. At least it is like this for me. But I can see that it seems easier just to do fast iterating without switching apps.


Now a few words regarding my common workflow:

Nearly all my objects start in Archicad where I hit "ctrl + alt + o" and I'm in a new object. I choose the subtype, make the parameters I need [1], fill in some basic structure, maybe even do a little prototyping. Then the object is immediately exported from Archicad and deleted from its embedded library. I have one or two big files where all development takes place. The main folder containing the objects will be linked as a lib.

Then I hop to my external editor of choice. Everytime I save a new .gsm gets built. All I need to do is to reload the library after alt-tabbing back to Archicad. And because I suggested that the Python connection should be able to send the "reload loaded libraries" command I don't even have to do that.

All in all it's not even slower than working on Archicad only 😉

 

[Footnotes]
[0]: Why I don't use ST frequently any longer is a complete different topic on its own.
[1]: How do I know you might ask. Well, I always start a project on (digital) paper with a pen in my hand. I know all details (>90%) beforehand.

 

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

For me, as i am working in GDL like You, my use of extern editors was "just trying" and then i went back to the Archicad-Editor, because testing is so much faster.  I really would like line-numbers, highlighting, bracket closing and so on - and i can have it in sublime, but i dont use it direct - just to type the code and then copy paste it direct in the Archicad-Editor back für testing in Archicad without any step between.

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