GDL
About building parametric objects with GDL.
SOLVED!

Can I override the order of the arrays?

soo
Booster

Hello. With everyone's help, I got some results I wanted.

But I want to put something more.

 

I added a function to remove the air layer by itself, but the air layer is still in the order of the layers.

when I want to put in additional functions, it's interfering.

for example,

A.png

Even on the right, the air layer is still got 4th order of array.

 

when i want to put some option of additional user text, it's hard to put right position.

 

Can I override the order of the arrays? Like this pic below.

B.png

 

My guess is that I should use "Call", but I wonder if my direction is right.

thank you for your kindness

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Jochen Suehlo
Moderator

I think, you have to create a temp-array, where you store the new values, and after this simply write
old_array = temp_array.
Here you can find an example, how to delete values from an array:
https://runxel.xyz/archicad-wiki/gdl/

 

Link amended - Barry

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

View solution in original post

5 REPLIES 5
Solution
Jochen Suehlo
Moderator

I think, you have to create a temp-array, where you store the new values, and after this simply write
old_array = temp_array.
Here you can find an example, how to delete values from an array:
https://runxel.xyz/archicad-wiki/gdl/

 

Link amended - Barry

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
soo
Booster

soo_0-1671408733395.png

The link doesn't open, but thank you very much for your help

Just follow the menus to the relevant page. It is odd that the links to his page always seem to get lost, even though they have the correct address...

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

Well, the link is "wrong". If one writes it with a lowercase "A" everything works.

EDIT: HUH?! That is weird! GS, your forum software sucks!

The posted link will get altered and the lowercase "a" becomes an "A". That's mad! WHY?

 

The trick is basically to write every item of the original array to a temp array – except the one you want to delete – and then write it back to the original array.

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | 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 |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

 

 

 


@runxel wrote:

Well, the link is "wrong". If one writes it with a lowercase "A" everything works.

EDIT: HUH?! That is weird! GS, your forum software sucks!

The posted link will get altered and the lowercase "a" becomes an "A". That's mad! WHY?


That is weird. 🤔

 

I have amended the link so it now works.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

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!