BIM Coordinator Program (INT) April 22, 2024

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

GDL
About building parametric objects with GDL.

For-To-Next is ignoring subroutine object

jc4d
Expert

Hello,

 

I have set a subroutine with a custom 3d object which it shows as it should in 3D, the problem starts when I use a For_To_Next operation, the 3D object disappears totally.

If I use a more simple object the For_To_next works.

 

Calling the subroutine alone it works:

jc4d_0-1653395718163.png

 

When For_To_Next is enable, nothing shows:

jc4d_1-1653395798689.png

 

If I use exactly the same For_To_Next with a simple block object, it works:

jc4d_2-1653395881269.png

 

I'm clueless about what is happening.

Juan

 

8 REPLIES 8
Miha_M
Advisor

Try to use quotation marks for the subroutine id ("400"). This is just a wild guess.

| Archicad 4.55 - 27
| HP Z840 | 2× E5-2643 v4 | 64 GB RAM | Quadro M5000 | Windows 10 Pro x64
| HP Z4 G4 | W-2245 | 64 GB RAM | RTX A4000 | Windows 11

runxel
Legend

The answer is probably in the subroutine itself.

What happens, if you put the block in a routine?.... Divide and Conquer!

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»

If you post the whole script it would be easy to know what's happening.

But the first comment is likely the solution.

`gosub 400` (which is totally valid!) and `gosub "400"` are different things, tho.

And what makes this unlikely is that the single `gosub 400` outside the loop works.

 

As mentioned, without the whole script everybody is blind.

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»
Barry Kelly
Moderator

I just tried by putting the BLOCK in a subroutine and that worked fine.

So I would suspect something in the 400 subroutine.

Did you forget the RETURN maybe?

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

I will strip down my script and I will share it.

Thanks, I double checked and there is a return statment.

Will do, didn't think about it.

Learn and get certified!