BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
GDL
About building parametric objects with GDL.

do you version control gsm files with github?

Jack D
Booster

I'm not entirely sure if this works but I was wondering if anyone of you guys use github to do version control gsm files.

 

I'm asking just cause I want to track who coded what and do version control if needed. The thing is .gsm files aren't like .vue or other text files. So seeing who pushed what is kinda impossible. But I want to use github just cause of the other benefits....

11 REPLIES 11
scottjm
Advisor

I was contemplating asking this exact question the other day!
I have attempted to use to git to version control development of our office libraries, but am yet to flesh out a fully functional system.

 

You basically have to decompile the GSM to and XML or the HSF format with the LP_XMLCONVERTER so that git can track the files as text files. 

The main issues I've found are as follows:

- You end up having to maintain gsm's and xml's/hsf's and continually decompiling and recompiling them to make sure they are in sync.  @runxel wrote a plugin for Sublime that helps massively with this though. (https://github.com/runxel/GDL-sublime)

- Different version of Archicad decompile a GSM to an XML file slightly differently.  So git will sometimes recognise the xml files as changed, but the gsm is identical.

- If you add a version number to the end of the gsm's for each Archicad release eg: Label 23, or Label 25 this wreaks havoc with git. It assumes they are completely different files so you can't track their changes between commits.  You have to use git mv to rename files.

- Having to actually learn how to use git properly and not just bumble my way through.. 🙈 

 

Would love to know how other are managing this too, especially how Graphisoft manage it internally for their Archicad Library.

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
runxel
Legend

Hi there,

I personally am a big fan of git. I use it for all my objects. However I explicitely do not put .gsm into git. They are partly binary and git is geared towards plain text obviously (and if you have the source code you can build the .gsm anytime again).

With the HSF format output by the LP_XMLConverter all needs are covered tho, because it's superior to the single massive chunk of XML that came before which was good for nothing much anyway. HSF gives you different .gdl scripts (you can get syntax hightlighting for that, see Scotts post ;)) for every script used in the object, and some .xml files for different parts, like all the parameters. It's nice and easy to work with.

Very sure GS uses some kind of vcs too, and probably that's why they came up with HSF in the first place.

 

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Miha Nahtigal
Advocate

I use git for GDL development for every object i maintain.

 

Using VSCode editor and having HSF format as main development origin makes it easier. I have an "autocompile" script inside the VSCode. Hitting save within HSF folder automatically compiles my object to GSM using LP_XMLCONVERTER. I've also added a toolbar button for library reload in AC work environment. After autosave and compilation of object I Alt+Tab to AC I can reload my lib usign toolbar button or a shortcut combo, so the changes to the object are almost instant.

I have also half-baked C++ Archicad Addon which implements REST service and API for ertrieving 2d and 3d data of specified object. My goal was to bring the geometry straight to VSCode and display it in a preview window of VSCode via three.js so no switching to AC would be needed. Unfortunatelly did not complete it yet.

BIMquants.comBETA - Quantities and Costs Estimation with Archicad AddOn :: rushing to publish a beta preview

hmmm this is interesting and this pretty much answers a few of my questions with using github. 

I was also thinking about Github actions to automate the conversions and pushing gsm files to different versions of Archicad. Basically do a CI/CD for library parts. To be honest, I have never used github actions so I don't know how well this works.

interesting... the next question is do you use Github Actions for this? 

 

I've been wondering about using Github and also some level of CI/CD with the library part.

scottjm
Advisor

i'm only use git with repo's on local drives, so github, or associated automation.  

Setting up a CI/CD pipeline with github actions sounds pretty interesting though, would love to know what you manage to get running.

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

Thought about this extensively, too.

The autocompile thing Miha mentions (either with my Sublime package or self-built for VSCode, which I also use) relies on the LP_XMLConverter tho, kinda obviously, which comes with Archicad. For it to run on Github Actions I think you would need a Docker image or a preconfigured Azure server, as far I understand, and I doubt the license allows us to do that. You would need to put the LP_XMLConverter exe and some 20 associated dll there and then configure everything, pay for the server, etc.

Too much of a hassle and I don't see the benefit.

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

ughhh 😞 ! That's a very fair point. damn it would be very useful if we could. I just started fiddling with my colleague's gdl library and I feel kinda naked changing the code and not have something to cover my mistakes. 

Hi,

 

We are using version control, storing hsf format on different branches for the released-supported and development versions.

We are driving LP_XMLConverter with custom tools. Once you collect all the needed parameters, only the libraries' input-output folders need to be changed.

We are adding a version-suffix to folder names before compiling the release gsm's, those are not stored in version control.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Learn and get certified!