Add Shift+Click duplicate handling to ReNumber tool#3127
Add Shift+Click duplicate handling to ReNumber tool#3127jmcouffin merged 2 commits intopyrevitlabs:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements three duplicate-handling modes for the ReNumber tool, accessible via Shift+Click, addressing issue #2889. The feature allows users to control how the tool behaves when encountering duplicate numbers during renumbering workflows.
Changes:
- Added three duplicate handling modes: Alert (warn and skip), Skip (already numbered), and Sweep (renumber displaced - the original behavior)
- Shift+Click now shows a dialog to select the desired duplicate handling mode
- Fixed two spelling errors in docstrings ("elemnet" → "element")
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| script.py | Implements duplicate handling modes with new constants, modified renumber_element and pick_and_renumber functions to accept and respect dupe_mode parameter, and added Shift+Click dialog flow |
| bundle.yaml | Updated tooltips in all supported languages to document the new Shift+Click duplicate handling feature |
...ns/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit2.stack/ReNumber.pushbutton/script.py
Show resolved
Hide resolved
...ns/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit2.stack/ReNumber.pushbutton/script.py
Show resolved
Hide resolved
...ns/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit2.stack/ReNumber.pushbutton/script.py
Show resolved
Hide resolved
...ns/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit2.stack/ReNumber.pushbutton/script.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2123-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26057+1645-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26057+2022-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26058+1619-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1027-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1126-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1139-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1233-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1244-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1357-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1403-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26069+2130-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26071+0706-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26073+1714-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26073+2220-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26074+1648-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26076+0001-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26077+2319-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26079+2333-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26080+1314-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2031-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2042-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2045-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2048-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2106-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26083+2130-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26086+2004-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26088+1318-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26089+1231-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+0549-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1533-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1536-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1540-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1540-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1556-wip |
|
📦 New public release are available for 6.2.0.26090+1754 |
Description
Implements the three duplicate-handling modes discussed in the feature request, accessible via Shift+Click:
Alert – warns the user and skips the conflicting element
Skip – silently skips elements that already have a number assigned
Sweep – original behaviour; displaces the conflicting element to the next free number
A dupe_mode parameter threads through renumber_element and pick_and_renumber with Sweep as the default, so normal (non-Shift) clicks are entirely unaffected. door_by_room_renumber is left unchanged for now and can be extended in a follow-up.
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: