We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-10-28 08:18 AM - last edited on 2024-09-24 10:29 AM by Doreena Deng
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....
2022-10-28 08:54 AM
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.
2022-10-28 10:05 AM
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.
2022-10-28 12:11 PM
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.
2022-10-30 11:04 PM
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.
2022-10-30 11:06 PM
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.
2022-10-31 02:09 AM
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.
2022-10-31 10:27 AM
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.
2022-10-31 11:01 PM
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.
2022-11-02 12:31 PM
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.