Add element addition and deletion triggers to UpdaterListener#3139
Add element addition and deletion triggers to UpdaterListener#3139jmcouffin merged 1 commit intopyrevitlabs:developfrom
Conversation
The existing UpdaterListener only registered GetChangeTypeAny which fires for modifications to existing elements. This adds separate triggers for GetChangeTypeElementAddition and GetChangeTypeElementDeletion so that doc-updater hooks can detect newly placed and deleted elements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This pull request enhances the UpdaterListener to detect element additions and deletions in addition to modifications. The existing implementation only registered GetChangeTypeAny(), which fires for modifications to existing elements. This PR adds separate triggers for GetChangeTypeElementAddition() and GetChangeTypeElementDeletion() so that doc-updater hooks can now detect newly placed and deleted elements.
Changes:
- Added trigger registration for element addition events (
GetChangeTypeElementAddition()) - Added trigger registration for element deletion events (
GetChangeTypeElementDeletion()) - Refactored trigger registration code for better readability by extracting commonly used variables
|
📦 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 |
Updater Listener enhancements
Description
The existing UpdaterListener only registered GetChangeTypeAny which fires for modifications to existing elements. This adds separate triggers for GetChangeTypeElementAddition and GetChangeTypeElementDeletion so that doc-updater hooks can detect newly placed and deleted elements.
Link to official documentation https://docs.pyrevitlabs.io/reference/pyrevit/versionmgr/updater/#pyrevit.versionmgr.updater.update_pyrevit
Before
After
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
Credits go to:
@gokul-pascalls
FYI
@WaynePatrickDalton
Thank you for contributing to pyRevit! 🎉