Skip to content

pyRevit reload hook event #2828

@kirsch33

Description

@kirsch33

I have some code that I run in an app-init hook right now that works great. However it is rolled back in the event of a pyRevit reload.

I would like the ability to place a script somewhere that pyRevit executes near the end of its reload sequence to restore any needed code at this time.

I've seen some mention in places of a "startup.py" script that might serve this purpose but documentation is lacking and everything I've tried for this hasn't worked.

Note one thing: the code I need to run depends on the shared lib/ directory being available and added to sys.path, I suppose I could include it manually but that's not required anywhere else within the pyRevit ecosystem

Am I missing something or is this not easily possible right now ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    New FeatureNew feature request [class->Implemented #{number}: {title}]needs-more-infoIssue required to follow the bug report template. Triggered by the stale issue workflow

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions