<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Loading Macro Failed after Importing System.Windows.Forms in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13865502#M84835</link>
    <description>&lt;P&gt;As an experiment I tried to import another reference called 'System.IO' using the same process as System.Windows.Forms and it worked just fine. I am able to access all it's functions and run the macro, so I'm not sure why the Forms reference is not working.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Oct 2025 14:14:11 GMT</pubDate>
    <dc:creator>luke_cunninghamE5NPR</dc:creator>
    <dc:date>2025-10-24T14:14:11Z</dc:date>
    <item>
      <title>Loading Macro Failed after Importing System.Windows.Forms</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13864594#M84834</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="luke_cunninghamE5NPR_0-1761250971268.png" style="width: 823px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1581577i1A788D8E72F73008/image-dimensions/823x395?v=v2" width="823" height="395" role="button" title="luke_cunninghamE5NPR_0-1761250971268.png" alt="luke_cunninghamE5NPR_0-1761250971268.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="luke_cunninghamE5NPR_2-1761252760917.png" style="width: 559px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1581590i4D08C10BB77BEE9C/image-dimensions/559x179?v=v2" width="559" height="179" role="button" title="luke_cunninghamE5NPR_2-1761252760917.png" alt="luke_cunninghamE5NPR_2-1761252760917.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;[The text below the macro says 'Loading the macro failed. Rebuilding the module may resolve this issue.']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I go back into my code, comment out the '&lt;SPAN&gt;from&lt;/SPAN&gt;&amp;nbsp;System.Windows.Forms&amp;nbsp;&lt;SPAN&gt;import&lt;/SPAN&gt;&amp;nbsp;*', 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!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 21:04:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13864594#M84834</guid>
      <dc:creator>luke_cunninghamE5NPR</dc:creator>
      <dc:date>2025-10-23T21:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Macro Failed after Importing System.Windows.Forms</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13865502#M84835</link>
      <description>&lt;P&gt;As an experiment I tried to import another reference called 'System.IO' using the same process as System.Windows.Forms and it worked just fine. I am able to access all it's functions and run the macro, so I'm not sure why the Forms reference is not working.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 14:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13865502#M84835</guid>
      <dc:creator>luke_cunninghamE5NPR</dc:creator>
      <dc:date>2025-10-24T14:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Macro Failed after Importing System.Windows.Forms</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13882879#M84891</link>
      <description>&lt;P&gt;I wanted to provide an update on this topic incase others had this issue. All I wanted to do was allow the user to select specific files from the file system. Unfortunately, I was never able to get this to work correctly but I found a workaround using Revit's native file explorer, which can be called using '&lt;SPAN&gt;FileOpenDialog'. From there I can get the rest of the files in that directory using 'System.IO.Directory.GetFiles'. It's not ideal but at least it creates a user interface.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 22:39:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/loading-macro-failed-after-importing-system-windows-forms/m-p/13882879#M84891</guid>
      <dc:creator>luke_cunninghamE5NPR</dc:creator>
      <dc:date>2025-11-05T22:39:26Z</dc:date>
    </item>
  </channel>
</rss>

