Skip to content

Add combined wipe tool for DC3D + TemporaryGraphicsHandlerService#3482

Merged
jmcouffin merged 2 commits into
pyrevitlabs:developfrom
Wurschdhaud:wipe-external-services-helper
Jul 22, 2026
Merged

Add combined wipe tool for DC3D + TemporaryGraphicsHandlerService#3482
jmcouffin merged 2 commits into
pyrevitlabs:developfrom
Wurschdhaud:wipe-external-services-helper

Conversation

@Wurschdhaud

Copy link
Copy Markdown
Contributor

Description

What

New pushbutton: Wipe External Services. Extends the existing DC3D
purge script to also cover TemporaryGraphicsHandlerService, with both
service types merged into one selectable list instead of separate
tools.

Why

Third-party plugins can leave orphaned/crashing registrations on
either service. One combined tool avoids having to hunt for two
different buttons when triaging a crash.


Checklist

Before submitting your pull request, ensure the following requirements are met:

  • Code follows the PEP 8 style guide.
  • Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
  • Changes are tested and verified to work as expected.

@jmcouffin
jmcouffin requested a review from Copilot July 10, 2026 18:42

@devloai devloai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary:

  • Adds a new "Wipe External Services" pushbutton under Wipe.pulldown that lets users combine and clear orphaned DirectContext3DService and TemporaryGraphicsHandlerService registrations in one selectable list.
  • Gracefully degrades when a service (e.g. TemporaryGraphicsHandlerService, Revit 2022+) is unavailable on older hosts.
  • Adds bundle.yaml with title/tooltip translations for 8 locales, consistent with sibling Wipe tools.

Review Summary:

The implementation correctly follows the existing pyrevit/revit/dc3dserver.py pattern for resolving/removing ExternalService servers (GetActiveServerIds, IsRegisteredServerId, RemoveServer), and error handling/fallback for unavailable services on older Revit versions is solid. Naming conventions (PEP8), blank-line spacing, and localization format all match repo conventions. One style issue was found: a couple of lines exceed Black's 88-character line length (manual +-based string concatenation), which conflicts with the PR's own checklist claiming Black formatting was applied. No functional/logic bugs were found.

Suggestions

  • Run pipenv run black on script.py to fix lines exceeding 88 chars Apply
  • Add an icon.png/icon.dark.png for the new pushbutton to match sibling tools Apply

@jmcouffin jmcouffin added the Tools Issues related to pyRevit commands [subsystem] label Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new pyRevitTools pushbutton under Project → Wipe that lets users remove problematic external service servers from both DirectContext3D and TemporaryGraphicsHandlerService via a single combined picker, helping with crash/instability triage when third-party add-ins leave bad registrations behind.

Changes:

  • Added a new “Wipe External Services” pushbutton script that enumerates active servers across two external service types and removes user-selected servers.
  • Added localized button title + a detailed multi-language tooltip describing the tool and its use.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/Wipe.pulldown/Wipe External Services.pushbutton/script.py New combined selection/removal workflow for DirectContext3D + TemporaryGraphicsHandlerService external servers.
extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/Wipe.pulldown/Wipe External Services.pushbutton/bundle.yaml New localized UI metadata (title/tooltip) for the added pushbutton.

@jmcouffin
jmcouffin merged commit 9a2db05 into pyrevitlabs:develop Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 6.5.4

@github-actions

Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 6.5.4

@Wurschdhaud
Wurschdhaud deleted the wipe-external-services-helper branch July 23, 2026 04:35
@github-actions

Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 6.5.4

@github-actions

Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 6.5.4

@github-actions

Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 6.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools Issues related to pyRevit commands [subsystem]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants