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.

hi pyRevit masters,

What I started off explaining the problem was: The pyRevit’s (Pick) tool is more meaningful and result-based than (selectElementType) tool. That is, user can physically see elements are truely selected using Pick tool, whereas NOTHING are selected if selectElementType tool is used (DESPITE Rvt does indicated a number of items have been selected at the bottom right window’s Status Bar).

With result of Pick tool elements selected can be manipulated, copied, moved etc…whereas for selectElementType nothing can be done (as though nothing is selected despite Revit tells the users something is selected).

My verdict of whole thing is, pyRevit’s SelectElementType tool is kinda ‘useless’, sorry to say that. Please prove my statement is incorrect, otherwise…thank you.

image snap attached:

That’s because the elements that are highlighted blue are INSTANCES of these element types. The select element types selects the TYPE of the family, not the instances placed in the model

These are types

When you place an instance of the type in the model, that is something that you can select.

Thanks Jpitts, that is very true to what your have described. Now it is clear to me that with ‘Pick’ tool it deals with instances of objects in model space, whilst ‘SelectElementType’ tool deals with Instance’s types. In other words, Pick tool could be more objective in that tangible objects could physically selected+manipulated. Whereas, I find selectElementType tool is a little abstract and could not give a tangible result. The latter could somehow have the type properties of an instance (object) selected and edited IF only 1x number exist in a project). If more than 1x nothing could be selected and nothing will be shown in the typeProp selector dropdown list. I tried to summarise any usefulness of selectElementType tool but I couldn’t, other than with the tool it does highlight the existence of such type properties in a project. If there is none, there is none in a project. IF there is some Revit will just list down the number of them at the bottom right of the status bar (that is it). Say for example, I would like to find out whether a particular project has any ‘stacked walls’ and this selectElementType tool’ll list them down. Other than that, It does not give me any other ideas of how to use this tool.

Any other ideas for basic everyday use (…or may be useful to scripting etc?) that I may not be aware of would be great.