-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
[Bug]: script.cs tools in custom extension not working #2373
Comments
I believe this boils down to this:
it seems that the C# script executor doesn't load the needed assemblies. I would be great to have the minimum reproducible example in the "To Reproduce" section 😉 |
Thanks for your reply @sanzoghenzo ! I just updated the post to add the code I'm trying to run. Super simple there's just nothing there ;) Re the original post, I initially tried without the using statements and got that first error message. If you reckon it's more useful I'm happy to edit the post to reflect that. Re the missing reference, that's missing on the pyRevit side, not my side, right? |
Thank you! To troubleshoot things, super simple examples are always better than nothing at all 😉
It's OK as it is, if the using statements solved those particular errors, it means that the revit api is correctly loaded and available to the script.
I believe it is a pyRevit.Runtime/CLREngine.cs issue, it doesn't make available the System.Runtime assembly (and who knows what other dlls are not loaded...) |
After a bit of scouting, I the references loaded by the CLREngine are those defined in the https:/pyrevitlabs/pyRevit/blob/develop/pyrevitlib/pyrevit/runtime/__init__.py#L243-270 You can try to add I'll to some tests myself as soon as I have the time |
That actually worked! |
Hey @jmcouffin I just uninstalled pyRevit, cleaned up all remaining files from the system, reinstalled with new installer and C# scripts work just fine ;) |
excellent, thanks for the update |
✈ Pre-Flight checks
🐞 Describe the bug
We have a few buttons in our internally developed pyRevit extension (Wombat) that are based off a script.cs script and they all don't work with the new pyRevit 5.
I also got rid of all the code inside of the Execute method to check if there was something there it didn't like but still getting an error (pasted below).
The buttons that have a script.py script seem to be working.
Is this a known issue?
I thought of letting you know.
⌨ Error/Debug Message
♻️ To Reproduce
⏲️ Expected behavior
No response
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
No response
The text was updated successfully, but these errors were encountered: