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

Issue when loading pyRevit while Revit is running #693

Closed
dbaldacchino opened this issue Sep 15, 2019 · 15 comments
Closed

Issue when loading pyRevit while Revit is running #693

dbaldacchino opened this issue Sep 15, 2019 · 15 comments

Comments

@dbaldacchino
Copy link

Describe the bug
Installed using the executable. The .addin manifest is placed in the user profile location and everything runs fine when opening Revit. We customize addin loading via a custom addin where we remove the original .addin manifest and drop it in the user profile if the user enables the addin. When doing this, I'm getting the following error with the latest version (4.7.1-beta2).

image

To Reproduce
Steps to reproduce the behavior:

  1. With Revit closed, remove the .addin manifest from %appdata%\Autodesk\Revit\Addins\20xx
  2. Open Revit
  3. Drop the .addin manifest back in %appdata%\Autodesk\Revit\Addins\20xx

Note that if I now leave the .addin manifest as is, then close and re-open Revit, pyRevit will load with no issues.

Expected behavior
pyRevit should load without issues

Screenshots
Please see above.

Desktop (please complete the following information):

  • OS: Windows 10 x64
  • pyRevit Version 4.7.1-beta2
@eirannejad
Copy link
Collaborator

eirannejad commented Sep 15, 2019

That's odd. Do you have the bin/engines/368 and bin/engines/372 directories in the install path?

@eirannejad
Copy link
Collaborator

I'll test this out today. So this issue happened when hot-loading pyRevit while Revit is running.

@dbaldacchino
Copy link
Author

Hi @eirannejad , yes they are present and yes, when hot-loading pyRevit while Revit is running.

image

eirannejad added a commit that referenced this issue Sep 15, 2019
@eirannejad
Copy link
Collaborator

Released 4.7 beta 3 with improvements. Hopefully it fixes this issue. Please test when you get a chance

@CuongVTC
Copy link

I used the above method but it still failed
Revit 2019.2
pyRevit_4.7.2 beta 3
see more https://imgur.com/TpjHW97

@eirannejad
Copy link
Collaborator

Would you check please to see if Nett.dll is inside the bin/ path in the installed pyRevit?

@eirannejad
Copy link
Collaborator

Also why is there a need to hot load pyRevit like this?!

@CuongVTC
Copy link

Also why is there a need to hot load pyRevit like this?!
Because it failed if I didn't do that. So let's try it
https://i.imgur.com/098RjPa.png

@eirannejad
Copy link
Collaborator

So odd.

@htlcnn
Copy link
Contributor

htlcnn commented Sep 16, 2019

@CuongVTC Try uninstalling pyRevit and install it again

@CuongVTC
Copy link

@htlcnn thanks,
I have reinstalled it several times

@dbaldacchino
Copy link
Author

Also why is there a need to hot load pyRevit like this?!

We have been doing this with all our addins for the last 3 years. Users have the option to load for the current session only or always. Only a couple fail and have to be set to "always" (the .addin manifest has to be in place before Revit starts or the addin fails to load properly). We do this for two prime reasons: loading speed when launching Revit and stability in general. We have tons of addins and it was slowing loading times considerably, especially on Citrix. Considering addins are only used occasionally, we needed a more "on-demand" process for loading them. This also gave us an entry point to see which addins are the most popular (we log loading data and visualize on a web portal). The second factor is stability: we were running into several issues where some addins caused file corruptions or instability, so by limiting what loads automatically when users are working, reduced the instance of these issues. Thanks.

@dbaldacchino
Copy link
Author

BTW beta3 resolved the issue @eirannejad :) Thanks a ton as always!

@eirannejad
Copy link
Collaborator

@CuongVTC I can not replicate the issue here on my machine. Not sure why this is happening. It's got something to do with the assembly resolution not being able to find Nett.dll

Maybe conflict with another addon

@eirannejad
Copy link
Collaborator

eirannejad commented Sep 16, 2019

@dbaldacchino Awesome! Phewww 😅!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants