Message 1 of 1
Error when invoking external code library through pyRevit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
A bit of an odd one today:
I'm creating a Revit plugin that is run through pyRevit. The plugin calls an external dll (Serilog - https://serilog.net/) for logging info to a database.
If I run the plugin via pyRevit directly I get an error saying: "Exception has been thrown by the target of an invocation" and it breaks.
I then found out that if I run the plugin via Revit's External Tools (Add-Ins > External Tools > Add-In Manager) the plugin works correctly. Moreover, if I then run the plugin again from pyRevit (after running via External Tools) it then works correctly via pyRevit too.
I really don't understand why this is happening and I'm wondering if anyone stumbled across anything similar.
Thanks!