We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-10-10 02:20 AM - last edited on 2024-09-24 10:16 AM by Doreena Deng
How do you use and array as an argument for the different shape functions?
A simple example:
! DO THIS:
DIM arr[]
arr[1]=1
arr[2]=1
arr[3]=15
arr[4]=2
arr[5]=0
arr[6]=15
arr[7]=1
arr[8]=3
arr[9]=15
PRISM_ 4,1,
0,0,15,
arr
! INSTEAD OF THIS:
PRISM_ 4,1,
0,0,15,
1,1,15,
2,0,15,
1,3,15
The array in question is comming from a C++ Addon and is arbitrarily large so i cannot "spell" out the arguments when calling the GDL functions. Or is there some kind of workaround?
I'm reading the GDL reference guide but haven't found an example of this yet: https://gdl.Graphisoft.com/reference-guide
Solved! Go to Solution.
2022-10-10 08:44 AM
Hi Benji,
I think you are looking for the Parameter Buffer:
https://gdl.Graphisoft.com/reference-guide/parameter-buffer-manipulation
There are examples for use at the bottom of the page.
The main idea is, that one uses `put` to store values on the buffer and `use` or `get` to retrieve them again. It's a data structure with FIFO principle.
Best, Bernd
2022-10-10 02:27 AM
I just found something called The parameter buffer which looks like it does what i want: https://gdl.Graphisoft.com/reference-guide/parameter-buffer-manipulation
2022-10-10 08:44 AM
Hi Benji,
I think you are looking for the Parameter Buffer:
https://gdl.Graphisoft.com/reference-guide/parameter-buffer-manipulation
There are examples for use at the bottom of the page.
The main idea is, that one uses `put` to store values on the buffer and `use` or `get` to retrieve them again. It's a data structure with FIFO principle.
Best, Bernd
2022-10-11 06:38 AM
This can be written in a for loop as well based on points to simplify or shorten the amount of code.