cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
jc4d
Expert

For-To-Next is ignoring subroutine object

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.5 - 29
| 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
Moderator

The answer is probably in the subroutine itself.

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

Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | 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»

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

But the first comment is likely the solution.

runxel
Moderator

`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 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | 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»
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
jc4d
Expert

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

jc4d
Expert

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

jc4d
Expert

Will do, didn't think about it.

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!