ilogic loop

ilogic loop

Anonymous
Not applicable
1,008 Views
1 Reply
Message 1 of 2

ilogic loop

Anonymous
Not applicable

whats wrong with this code ? i want to let the code loop until distance is equal or greatet then 10.

SyntaxEditor Code Snippet

For distance <10  

If start_rules= True  Then
Start_Y= True
Start= True

End If
Next

 

0 Likes
Accepted solutions (1)
1,009 Views
1 Reply
Reply (1)
Message 2 of 2

HermJan.Otterman
Advisor
Advisor
Accepted solution

use "While"   and   "End While"

 

while distance < 10  does an action as long as distance is smaler than 10.

 

watch out!! you can't stop this loop with the keyboard! only by killing Inventor CTRL ALT DEL, end process...

so before you use this : save! you code

 

or build in an escape that distance will become > 10 after 100 loops or so

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes