I tried finding the uniqueitems, and then sorting (just to get an overview) and there are “null” values in there which causes the error.
The “null” values are on index: 1134, 3666, 3674 and 7776
These could occur if the curve/line you are trying to find the length of has a length of zero (if startpoint and endpoints are at the same location)
In this case the indexes contain points and not lines (and the error thus happen) my guess is that this is the corner points of your “grid”
Great that it worked for you, the solution is not perfect as it might be smarter to filter out the points rather than filtering “in” the lines, this would allow for polycurves to also be passed and “used”.
Note that the previous node had the preview disabled. I have used this to pull the list and geometry preview further along in the graph, allowing me to turn the background preview on and off as needed. The joy of instant and periodic feedback.
Sometimes I use that too. But it lacks the ability to shrink down nice and compact - Incase you couldn’t tell from looking at other stuff I’ve posted I like small and well aligned nodes. I’m kinda OCD about it to a fault (“ah the bottom of this code block node would align with the bottom of that node without hiding that wire if I swapped it out for a string node!” begins to trade out all code blocks containing single strings)
I know the feeling. I had this massive graph where every node would be centered properly in the smalles number of background squares I could fit them in.
…and then I finally managed to update my Dynamo version and everything started to overlap. I will also refuse to ever have a line going backwards.
I do think it’s very important to keep everything nice and tidy simply for the sake of clarity. Thinks can get messy very fast.
And ometimes you just end up with this:
Personally I prefer making it work, and then going back and simplifying as much as possible, if I can fit a large workflow into a codeblock or a python-node then I’m very happy as I do also like to keep it tidy without turning the graph into a black box
Absolutely. Making it work is a priority but after a bit is done I always go back to clean it up.
I particularly hate needing massively long lists with strings in code blocks (often parameter names and alike) so I recently started doing these kind of things:
But then again, I’ve only been on the forum for 3.5 months and using dynamo for approximately 8, so there might be way better methods of achieving the same results.