Slowly picking up RhinoPython, like again…Really appreciate for the help!
it is a basic question while trying to read the McNeel tutorial, about the “Conditional Evaluation - if”:
import rhinoscriptsyntax as rs
somenumber = rs.GetReal(“Line length”)
line = rs.AddLine( (0,0,0), (somenumber,0,0) )
if line is None:
print(“Something went wrong”)
else:
print(“Line curve inserted with id”, line)
Question: if I type in “0”, it will stop immediately after line 3 with the traceback “Unable to add line to document”,
ASK:
Is there a way for me to bypass this “null” data, and keep going to the “if” statement.
Thank you very much!
Cheers,
Ran
4 posts - 4 participants