Conversation
There was a problem hiding this comment.
PR Summary:
This PR introduces a new pyRevit tool "Select All Objects Passing Filter" that addresses issue #2243. The tool allows users to:
• Select multiple Visibility Graphics Filters from a dialog
• Apply OR logic to combine filters using DB.LogicalOrFilter
• Select all elements visible in the active view that match any selected filter
• Enables downstream workflow of hiding (HH) or isolating (HI) filtered elements
Review Summary:
The implementation is functionally sound and follows established pyRevit patterns. The code correctly uses FilteredElementCollector with view scoping, implements proper error handling for edge cases (no filters found, no valid element filters, no matching elements), and provides multi-language support in the bundle configuration. The logic properly addresses the user's workflow need for selecting elements by filter criteria before isolation operations. No critical issues, performance concerns, or logic bugs were identified.
Follow-up suggestions:
@devloai add an icon for the new button to complete the UI integration
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new pyRevit tool that allows users to select all elements in the active view that pass one or more selected filters. The tool addresses issue #2243 by providing a way to select filtered elements for subsequent operations like hiding (HH) or isolating (HI).
- Adds a new selection tool that combines multiple filters using logical OR operation
- Restricts selection to elements visible in the current view only
- Provides multi-language support with AI-generated translations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| script.py | Main implementation that collects filters, allows user selection, combines them with LogicalOrFilter, and selects matching elements in the active view |
| bundle.yaml | Configuration file with multi-language titles and tooltips for the new tool button |
...on.panel/select.stack/Select.pulldown/Select All Objects Passing Filter.pushbutton/script.py
Show resolved
Hide resolved
|
Simple yet very efficient tool! |
Description
Introduces a new function selecting all elements that pass one OR more filters. Only for elements visible in current view.
As described in the issue, you can than hide (HH) or isolate (HI) them to do edit them.
Checklist
Before submitting your pull request, ensure the following requirements are met:
pipenv run black {source_file_or_directory}Related Issues
If applicable, link the issues resolved by this pull request:
Additional Notes
Translations done by AI.
Thank you for contributing to pyRevit! 🎉