pyRevit's Selection > 'Select Element Types' tool

Hi, I have used Pick tool which is quite straight forward whereby once Pick tool is invoked one just need to follow up with window selecting all visible objects in view in order to have specific element selected.
However, when trying to use ‘Select Element Types’ (which has more specific categories selection criteria) I find that there are something specific selected (as indicated at bottom right of status bar highlighting number of items selected) successfully using the tool BUT nothing is revealed or shown selected in the model view.
What is actually the use of this particular tool?
How it should be used?
Wouldn’t ‘Pick’ tool is good enough to do some jobs necessary without ‘Select Element Types’ tool?
Your expert advice much looked forward to…

@kntLpyR001

can you not just use FilteredElementCollector ? and filter out by Name
you can also use ActiveView.

Element Types are the types listed under the family in the project browser. When you place in the model its called a family instance. That instance has a family type, but the element itself is a family instance.

You can use a FEC to get the types like Andreas mentioned, but you can’t manually select a type.

If you need to select familyinstances of a specific family type, you can create a ISelectionFilter and apply it to a pickobjects to do this.

either my question was too simple, not interesting enough or have got myself to the deep end of the pool. I thought at instance I might be in a incorrect forum but I think am not. The scalability of using python scripting is endless and can do more than what is merely a tool up in the pyRevit ribbon tools. I appreciate greatly the feedback (andreas/JP) and would love to know more about FilteredElementCollector, ActiveView, FEC, ISelectionFilter & thousands more codes in scripting…but back to my query: Does anyone know how to use the novice Ribbon tool pyRevit>Selection>‘Select Element Types’ tool ? Tool was invoked, items were selected but nothing is highlighted in model view… Why so, I must have not doing it right.

Ode to laziness, mind me.

the select elements types is design differently and handle only a few use cases for the selected elements, I have been lazy and alt+click on the button, got to the code folder and ask chatgpt to explain it for me.

This pyRevit tool allows the user to select a category of Revit elements, such as graphic styles, fill patterns, area schemes, or line styles, and then selects all elements of the chosen category in the current Revit document. Here’s a breakdown of the code:

  1. Gather Graphic Styles:
    The tool retrieves all GraphicsStyle elements from the Revit document, filtering out those with internal categories. The graphic styles are stored in a set, each prefixed with 'Graphics Styles: ’ followed by the category name.

  2. List Options for the User:
    The all_options list combines element_types, the gathered graphic styles, and predefined options (‘Fill Patterns’, ‘Area Schemes’, ‘Line Styles’). This list is displayed to the user in a command window where they can choose an option.

  3. Handle User Selection:
    Once the user selects an option:

    • If ‘Fill Patterns’ is chosen, it retrieves and selects all FillPatternElement elements.
    • If ‘Area Schemes’ is selected, it retrieves and selects all AreaScheme elements.
    • If ‘Line Styles’ is selected, it retrieves and selects all line styles.
    • If a graphic style is selected, it retrieves and selects elements matching the specific graphic style category.
    • Otherwise, it retrieves and selects all ElementType instances matching the chosen type family, excluding elements with the same family name as their element name.

In essence, this code dynamically filters and selects Revit elements based on the user’s choice from several predefined or dynamically gathered categories.