Loading Macro Failed after Importing System.Windows.Forms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
Right now I'm having an issue with a Macro I'm building in SharpDevelop (in Revit 2024). After some time developing my Macro I decided I wanted to use the OpenFileDialog function of System.Windows.Forms so that the user can select multiple files from a folder. I added it to my Refences (along with System.Drawing) and added it into my code (see attached image).
The macro builds successfully but when I go back to Revit the Macro Manager does not let me run it, saying it failed to load.
[The text below the macro says 'Loading the macro failed. Rebuilding the module may resolve this issue.']
If I go back into my code, comment out the 'from System.Windows.Forms import *', and rebuild, the Macro Manager works just fine. Other than the code I've written, everything should be at its default setting. Any help would be appreciated!