algorithmic modeling for Rhino
can you post the code inside the script cause I don't have Rhino handy now.
M.
i want to take results only if the input is True!
tnx in advance,
the code is totally incorrect
ok..
you have to use indentation in your scripts. (the following is not tested)
if x:
a=y
print "Bazinga"
else:
print "x is false so I do nothing"
note: type hint to x as bool
y is something i don't know what you are going to choose for this i can't make it out from the screenshot
EDIT: indentation is the four red dots you get when you press "tab" and the they define your loops and if statements.
print means you are outputting a string. so if you only want to print something you don't need an output parameter ( the a)
if x:
print "y"
else:
print "x is false so I do nothing"
to set an input as a boolean right click on the input ->dropdown type hint bool
y is going to be type hint float
ok! it works!
but i still get a number in a
output prints "x is false so I do nothing" but (a) continues to print numbers
your a=y must be out of the loop
see the attached
And I was sure that I could manage just fine from my iPad.
there you go
ah ok! i get it... i take results only from the "out"!
tnx Marios!
no worries.
but from out you are getting runtime messages(it can be only string|text)
a is your parameter output (so it can be a point, a mesh, everything)
you have to get this sorted out..
best,
M.
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by