Repository navigation
Replies: 2 comments 2 replies
|
Please post an operational code snippet for specific questions. Sorting example with python https://docs.python.org/3/howto/sorting.html import element_controller as ec
import attribute_controller as ac
import geometry_controller as gc
element_ids = ec.get_active_identifiable_element_ids()
sort_elements_by_length = sorted(element_ids, key= lambda element : gc.get_length(element))
for element in sort_elements_by_length :
print(gc.get_length(element))
>>> 500.0
>>> 500.0
>>> 700.0
>>> 6789.999999999996
>>> 17586.00000089407 |
|
Hey @Dip115 , I hope that will help, |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello!
I have a problem with moving elements around. I have a script that moves selected elements to one point.
But there's no way I can make it so that the elements are next to each other instead of overlapping. And I would like them to be sorted by length. Can anyone tell me how to solve this problem? Thanks!
All reactions