cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Archicad C++ API
About Archicad add-on development using the C++ API.

Writing back an array

runxel
Legend
I'm working on a GDL add-on (you know, the thing you call with "open("NAME", "", ...)").
What I want to achieve is to yield an array, in the best case a two-dimensional one, back to GDL.

I know I have to write inside the `InputFromDataFile` function to the GDLRequestResult param.
So far, so good. But how to construct the array?
And how to declare the variable in GDL beforehand? Mind you: The user doesn't know how big the array is!
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

«Furthermore, I consider that Carth... yearly releases must be destroyed»
10 REPLIES 10
runxel
Legend
runxel wrote:

Regarding your code example:
When I replace GDLRequestResult with GS::Array<GdlValueRecord> the compiling will give me linking errors (LNK2001) in the GDLDev.lib – but not declaring the return value an array isn't what I am after, either. Obviously. :/
Any thoughts on that?
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

«Furthermore, I consider that Carth... yearly releases must be destroyed»