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

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 | 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»

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 | 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»
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
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

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.