Find the next step in your career as a Graphisoft Certified BIM Manager!

GDL
About building parametric objects with GDL.

Is it possible to make http GET requests withGDL?

Mihalcea Bogdan
Contributor
I need to read from an API which gives me a JSON or TXT containing information like dimensions, price, barcode etc.
Can I make this with GDL or I have to make an AddOn?
8 REPLIES 8
Peter Baksa
Graphisoft
Graphisoft
Hi Mihalcea,

You can read local files with GDL but for HTTP requests you will need to write an add-on.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Mihalcea Bogdan
Contributor
Peter wrote:
Hi Mihalcea,

You can read local files with GDL but for HTTP requests you will need to write an add-on.
Is it possible to create a GDL Addon for such requests?
Lingwisyer
Guru
Mihalcea wrote:
Is it possible to create a GDL Addon for such requests?

Possible, yes.
Will GS code one, probably not anytime soon unless there is huge demand for it.

If you really need it, your best option is probably to write one yourself or hire someone to do it for you.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Mihalcea Bogdan
Contributor
Lingwisyer wrote:
Mihalcea wrote:
Is it possible to create a GDL Addon for such requests?

Possible, yes.
Will GS code one, probably not anytime soon unless there is huge demand for it.

If you really need it, your best option is probably to write one yourself or hire someone to do it for you.



Ling.
Any documentation on how to make GDL Addons ? Can I make in C++ API GDL AddOns?
runxel
Legend
Mihalcea wrote:
Any documentation on how to make GDL Addons ? Can I make in C++ API GDL AddOns?
Not much, really. The documentation is super sparse.
The best thing next I know off, is my own documentation and template I made out of frustration.
Seems a bit like GS doesn't want to support that in the future.
People like the great Ralph Wessel also campaign to not develop any new GDL Add-ons, since they are so limited (see note below). Instead I think he and others switched to use the regular C++ API and then "fill in" objects. This however has other drawbacks of course (e.g. the Add-On has to be tailored to the object).

Beware:
GDL Add-ons are very limited and can not interact with the project or communicate with other add-ons. They are truly independent.
You should just use them to offload heavy tasks or computations you can't do in GDL (like bitwise calculations or I/O).
Making HTTP request would surely work as well.
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»
Mihalcea Bogdan
Contributor
@runxel
Pure gold what you shared on your GitHub. I feel you with the frustration part!
runxel
Legend
Mihalcea wrote:
@runxel
Pure gold what you shared on your GitHub. I feel you with the frustration part!
Thank you for the kind words! I hope it will be helpful for others.
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»
Peter Baksa
Graphisoft
Graphisoft
If the HTTP API sends data that might change after an object is placed, the objects would need to be rebuilt (executing the GDL request) each time they are drawn on the screen or a layout. I am not sure whether a GDL add-on can do this, please consult the developer forum or ask developer support.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

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!