Hello @Jean-Marc,
I did my best at solving my own issue!
I introduced the new optional argument sort_groups to the init.py file, added it to the description and to the example, raising a PyRevitException for wrong input. Everything works as expected.
Now my problem is that I really have no idea how github works, your description in the starting post is not detailed enough for me to understand
So please tell me if I can do anything more to help!
Full code posted in the thread below.
class SelectFromList(TemplateUserInputWindow):
"""
Args:
.......
sort_groups (str, optional):
Determines the sorting type applied to the list groups. This attribute can take one of the following values:
'sorted': This will sort the groups in standard alphabetical order
'natural': This will sort the groups in a manner that is more intuitive for human perception, especially when there are numbers involved.
'unsorted': The groups will maintain the original order in which they were provided, without any reordering.
Defaults to 'sorted'.
Example:
>>> from pyrevit import forms
>>> ops = {'Sheet Set A': [viewsheet1, viewsheet2, viewsheet3],
... 'Sheet Set B': [viewsheet4, viewsheet5, viewsheet6]}
>>> res = forms.SelectFromList.show(ops,
... multiselect=True,
... name_attr='Name',
... group_selector_title='Sheet Sets',
... button_name='Select Sheets',
... sort_groups='sorted')