algorithmic modeling for Rhino
Hey,
I'm currently experimenting with Python, grasshopper and point attractors, but I'm stuck with a script error produced by the following line:
for i in range(len(Curves)):
AttractorPtsList.append(AttractorPts[i])Runtime error (TypeErrorException): len() of unsized object
AttractorPts is a variable that is filled with an external list of points, with a type hint of "Point3D".
Curves is an external list of curves, first rebuild (ReB; Degree 1, Count 16) and then input with a type hint of "Curve", which in my mind produces the script error?
I can't figure out a workaround though. Any ideas?
Tags:
Hi Marc,
You probably have your "Curves" input set to "Item access" instead of "List access".
Please attach your files for any further issues.
The "Curves" input was automatically set to "Item Access".
Also changing it to "List Access" didn't do any good.
Thanks for your help so far.
I've attached the files.
Hi Marc,
I just checked your file. You need to set both the AttractorPts and the Curves to List Access. Once you do that the scripts works fine.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by