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

Didn't even know about this, looks like I have a fun weekend ahead of me!

Super stoked to see how it all works!

Doors :). We suffer from localized doors that have the gastly >1025 parameters problem with our localized doors which causes all  kinds of mishaps.

AC 25 SWE Full

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

@runxel, have you considered/ investigated porting your Sublime Text plugin to VSCode?  I wrote some very basic pseudo python to run LP_XMLConverter from a VSCode Task, but your Sublime plugin is far superior!  But VSCode seems to be becoming the industry standard IDE these days.

 

Also, you mentioned you are using Python to initiate the Library Reload - that sounds amazing! Is this included in the latest version of your Sublime Plugin? If not, i'd love be able to get my hands on the python script you are using for this.

 

Cheers,

Scott

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

Hey @scottjm 
Yes I considered that. I have even started to migrate a bit of the code, but since VSCode is an Electron app everything needs to be in Typescript. I had never used TS before so it was a slow thing and in the end GS overtook me, which I think is actually great. They acknowledged that there is a strong and thriving GDL community that needs and deserves better tools.

The library reload command is not yet included in my ST plugin. You can give it a go by yourself with Tibors add-on.

Lucas Becker | AC 27 on Mac | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Lot's of experienced gdl'ers here commenting but they're imo not the ones a proper editor would target in the first place...it's the many people not yet into gdl...scared by the 80's interface and ditching it before even having tried. 27 or later... is very late for not such an archaic effort!? I know it's about priorities though...

AC 25 SWE Full

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

Thanks @runxel, yeah totally get that - if only GS's extension had the functionality that yours did it would be a total solution.. 

Thanks for the link to the extra python addons, that's awesome!  God I wish GS would open up the python connector so much more - the possibilities are just endless if they did!

 

So I threw together this little proof of concept for my verion of working seamlessly between AC and VSCode using the FileWatcher VSCode extension and the Python Reload Library command.

 

It basically gives you the live version of the GDL in VSCode, every time you save in Archicad.  And every time you save in VSCode, the library part will auto-reload. 

The only one hurdle is that Archicad does not auto-refresh the GDL if you have the object open when you save in VSCode and Archicad marks it as [Read Only] - so you have to close the editor and reopen if you want to edit in Archicad - so close!

 

I've attached a little demo video and the source code.

- VSCode Workspace Settings to run the Filewatcher Extension (available here: https://marketplace.visualstudio.com/items?itemName=appulate.filewatcher)

- Copy Python Script vsgdl.py into the root folder of your workspace folder.

 

Please exercise extreme caution!  I threw this together in an hour, so there is little to no testing, no error trapping, and I'm pretty sure the likelihood of accidentally overwriting your code is very high!

 

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

Hi @scottjm

Thanks for your code, that's super exciting!

Whoa! I think this is the closest solution I've seen. AMAZING WORK!

Doors and windows are currently being overhauled, if you want to pm me about your door needs I can see if that fits into how I'm doing things.

My doors are super custom to my template at the moment.

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!