Sorting views by name


#1

Hi all!
I´m trying to sort some of my vies and can´t figure out what I´m doing wrong. If I sort them by function > element name they get messed up if the name contains numbers above 10 and sort by key doesn´t seem to work, one of the views, the one finished with …copia 25 doesn´t move of it´s initial position.

Any help would be much appreciated!


#2

Take a look at this post maybe:


#3

Hi @Yna_Db, it´s always a pleasure to read you and thanks for your help once more!
I haven´t reached to my desired result yet, I´ll post as soon as I test it properly. Thanks!


#4

I have made some tests and finally got a correct result with [&] List.SortByKey from Ampersand, using Element.GetParameterValueByName to get “View Name” parameter values as keys


#5

Didn´t know that Ampersand has these cool stuff! (just finished Colin´s paneling with Dynamo and didn´t have enough time to dive deeper into it)

Thnks Yna, Tried with 3D views and it works cool,

But it does weird stuff in floor plans. Not sure why my level 2 is behaving in this strange way.

I think a good workaround would be the one suggested by @ScottWeiter5186 to start numbering with 0.