List.Count Design Geometry element doesn't run

Hi, i can’t count element (design geometry element) in Python.
How can i resolve the problem?
Thanks!

1 Like

@c.cavalieri.ext ,

len is just use for strings…

you have to access the length

#curvelength
OUT = (IN[0]).Length

#string length
OUT = len(IN[0])

Thanks, but i want count the number of curve (List.Count).

@c.cavalieri.ext ,

check out this

You are calling for the count of the line, not the list which contains all the lines. One less for loop need.

Try something like this, starting around line 60:

boundaries = [i for i in room.GetBoundarySegments(boundaryOptions)[0]]
segmentCount = len(boundaries)
output.append(segmentCount)

Thanks! It’s works!
It was a problem with the level of the list.