GDL
About building parametric objects with GDL.

GDL-Exporter

Anonymous
Not applicable
Hi,
is there any way to create my own .gsm-files?
I've looked over the SDKs but didn't find any information about the internal file structure. The data i want to export is rather simple:

I only need to export binary 3d data and some material information to a GDL file. Is there any information about this?

There a two problems I've encountered so far:
1. How is the header/footer of the .gsm file constructed.
2. How is the binary data for "BINARY" organized
10 REPLIES 10
Ralph Wessel
Mentor
psy wrote:
is there any way to create my own .gsm-files?
I've looked over the SDKs but didn't find any information about the internal file structure.
You can create and edit .gsm files without knowing any of the specifics of the file structure if you use the ArchiCAD API. Take a look at the Function Reference for the Library Part Manager in the devkit documentation.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:

You can create and edit .gsm files without knowing any of the specifics of the file structure if you use the ArchiCAD API. Take a look at the Function Reference for the Library Part Manager in the devkit documentation.


Thanks so far Ralph, I'm going to take a deeper look into the SDK.

But can I use the API without actually using Archicad? I need to built an exporter for my own stand alone-application. As far as I understood the API it only allows me to write plugins, rather than using it in a 3rd-party product.

Could someone provide me some pointers to some resources? I really need to be able to write those files from my own application.

And still, there is the second problem: How is the binary data in GDL-files organized?
Rafal SLEK
Enthusiast
GSM files are text files and they could be edited in every text editor (but of course can't control it how it looks and works in Archicad then).
If You need to make some changes in existing libraries eg. change name parameters, translate them to another language You should use the XML files for that.
You could export whole library to XML from Archicad and import them after changes are made.
Binary data I think are rather undocumented - probably only GS know the structure of them or some experienced API developer.
MacBook Pro Retina 2019/2.4 GHz/Intel Core i9/32GB RAM/Radeon Pro 5500M 4GB/macOS 11.6/ArchiCAD 25vINT+POL/Maxwell Render 5.2/Twinmotion 2022.1
Anonymous
Not applicable
GSM files are text files and they could be edited in every text editor
Disagree, the DGL "script" inside is pure text, but the file itself seems to have a header/footer in binary format 😞

Rafal SLEK
Enthusiast
Sorry - I misunderstand You - if You need edit only binary data the answer really is not appropriate.
MacBook Pro Retina 2019/2.4 GHz/Intel Core i9/32GB RAM/Radeon Pro 5500M 4GB/macOS 11.6/ArchiCAD 25vINT+POL/Maxwell Render 5.2/Twinmotion 2022.1
Ralph Wessel
Mentor
psy wrote:
But can I use the API without actually using Archicad? I need to built an exporter for my own stand alone-application. As far as I understood the API it only allows me to write plugins, rather than using it in a 3rd-party product.
Yes, the API is dependent on ArchiCAD. It isn't intended for stand-alone applications.

GDL is not a published/public file format, so you would need to reverse-engineer the file structure. I believe this has been done in the past because there was (is?) a 3rd party GDL editor available. The same is true of most CAD formats, e.g. DWG. The binary data heading up each section is quite short, so it would probably be an easy job.
Ralph Wessel BArch
Ralph Wessel
Mentor
Rafal wrote:
GSM files are text files and they could be edited in every text editor (but of course can't control it how it looks and works in Archicad then).
GSM files aren't strictly text files. You can open them with a text editor and read/edit the scripts as plain text, but you will also notice that each section in the object has a header which is neither plain text nor easy to interpret. The structure of the header data is the focus of this topic.
Ralph Wessel BArch
Oleg
Expert
psy wrote:
1. How is the header/footer of the .gsm file constructed.
2. How is the binary data for "BINARY" organized
I can not help, just information.
Up to version 7 of ArchiCAD, there was GDL API available, which included the GSM file format description, including binary section. Though it was incomplete and now really outdated. But, perhaps the format is not strictly closed, however I am not sure, that you will not need the special agreement on use it from GS.

I think, that anyway, better way for you to contact to Graphisoft and ask a format technical reference and specify rights on its using.

PS:
I do not know about your application, but may be you may create an ArchiCAD's import Addon for native format of your application.
Anonymous
Not applicable
Thanks so far. I've been able to reverse engineer the most important parts of the .gsm file structure. In other words: I'm able to build .gsm files that can be read by the Graphisoft GDL Object Explorer.

My second problem remains unsolved, though. Since I'm not in possession of Archicad, I cannot create any binary-data from GDL-Scripts.

Could someone be so kind and create some simple examples?
Like placing a simple geometrical form (a block with let's say BLOCK 1,2,3) at the origin and saving it to an binary-GDL?

This would be really helpful.
If anyone is interested in the File-Structur I deciphered so far, drop me a line.

regards psy

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!