Enhanced UI Selection

Hi All, I am trying to create a script to select Families and Types of a particular category.
I want to get my selection in such a way that it allows me to filter it based on Family and within that family it puts types.

till now I have managed to get either Family in selection or Type for a particular category(see 2nd snap).

anyone have idea to get the Family and its type in UI selection as appearing in 3rd snap


image

I believe you’ll be after a treeview, which datashapes has a node for with inspectable Python code.

2 Likes

yes treeview is the way but can be done with listview as well…

and treeview

1 Like

Hi @sovitek, Thanks for your quick response.
the problem is in the method is when we have a lot of families and types it will give us an long Selection input which beyound our control. Also I have noticed these nodes are giving families which is in the model wethere it is used or not in the project.

I want to see only families and its type which are currently being used in Project.
earlier I want to go with Unique Item so I have a compacted List only but I noticed it only select one element out of all in the project. I want to select one type and it give me all the instances used in project such that if i seclect 10x100 plate if there are 50 plates in project it select al of them

Hi @GavinCrump, Yes but Unfortunetly I am not being able to utilised it effectively for my project.

@sovitek @GavinCrump
When I follow element type to filter and group elements I get families to select which works fine but i am not being able to make a sublist/tree of type which these


image

hi is it something ? guess its best with tree view in that case …if i understand :wink: thend you can expand the tree…

or if the family instances…maybe :wink:

1 Like

Thank you Mr. @sovitek it worked :slight_smile:

1 Like

great :wink:

Just to add, this is more what I was thinking, nest each tree under its family name.

Treeview.dyn (22.0 KB)

1 Like

Thanks @GavinCrump for totally different approach. :heart:

1 Like