Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forms.register_dockable_panel throws an exception if dockable panel already exists #1472

Closed
eirannejad opened this issue Feb 6, 2022 · 7 comments
Labels
Enhancement Enhancement request [class->Improved #{number}: {title}] Prioritize The issue is planned to be resolved in the next version Python API Issues related to pyrevit as a python module [subsystem]

Comments

@eirannejad
Copy link
Collaborator

add a new method to check existence of already-registered dockable panel:

from pyrevit import forms

class DockableExample(forms.WPFPanel):
    panel_title = "pyRevit Dockable Panel Title"
    panel_id = "3110e336-f81c-4927-87da-4e0d30d4d64a"
    panel_source = op.join(op.dirname(__file__), "DockableExample.xaml")

    def do_something(self, sender, args):
        forms.alert("Voila!!!")


if not forms.is_registered_dockable_panel(DockableExample):
    forms.register_dockable_panel(DockableExample)
@eirannejad eirannejad added Enhancement Enhancement request [class->Improved #{number}: {title}] Python API Issues related to pyrevit as a python module [subsystem] Prioritize The issue is planned to be resolved in the next version labels Feb 6, 2022
eirannejad added a commit that referenced this issue Feb 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

📦 New work-in-progress (wip) builds are available for 4.8.9.22039+2254-wip

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

📦 New work-in-progress (wip) builds are available for 4.8.9.22039+2341-wip

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

📦 New work-in-progress (wip) builds are available for 4.8.9.22040+0150-wip

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

📦 New work-in-progress (wip) builds are available for 4.8.9.22040+1708-wip

@eirannejad
Copy link
Collaborator Author

📦 New public release are available for 4.8.10.22040

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

📦 New work-in-progress (wip) builds are available for 4.8.11.22040+1907-wip

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

📦 New work-in-progress (wip) builds are available for 4.8.11.22040+1932-wip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancement request [class->Improved #{number}: {title}] Prioritize The issue is planned to be resolved in the next version Python API Issues related to pyrevit as a python module [subsystem]
Projects
None yet
Development

No branches or pull requests

1 participant