Warn users when view range is driven by view template#3155
Warn users when view range is driven by view template#3155jmcouffin merged 8 commits intopyrevitlabs:developfrom
Conversation
0801c4c to
a48306d
Compare
There was a problem hiding this comment.
Pull request overview
Updates the View Range toggle tool to detect when a selected plan view’s view range is controlled by an assigned View Template, and to warn the user before proceeding—addressing issue #3110 where the tool could unintentionally override template-driven settings.
Changes:
- Detects when
PLAN_VIEW_RANGEis controlled by the view’s template and stores the controlling template reference. - Adds a confirmation dialog before applying view range changes when the view range is template-driven.
- Updates the UI message to indicate when the view range is driven by a template (plus some formatting/line-wrapping refactors).
...RevitTools.extension/pyRevit.tab/Toggles.panel/toggles3.stack/ViewRange.pushbutton/script.py
Show resolved
Hide resolved
...RevitTools.extension/pyRevit.tab/Toggles.panel/toggles3.stack/ViewRange.pushbutton/script.py
Show resolved
Hide resolved
|
📦 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 |
|
@thumDer was the intention to update the view template view range as well or just provide the warning? I get the warning "about to change View Template" but the view template itself doesn't update. I also don't see anything in the code that is attempting to change the view template. |
|
@porrt23 it was explained here: #3155 (comment) |
Warn users when view range is driven by view template
Description
Check if view range of the selected view is driven by a template, and warn users on the UI and in an additional warning dialog about changes will be made to a view template, option to cancel.
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
Thank you for contributing to pyRevit! 🎉