# System.Windows (Winform) with Ironpython

**URL:** <https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [March 26, 2023, 12:05am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825 "2023-03-26T00:05:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanywillim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hanywillim/32/155832_2.png) [@hanywillim](https://forum.dynamobim.com/u/hanywillim)\
**Post date:** [March 26, 2023, 12:05am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/1 "2023-03-26T00:05:48Z")

</div>

Hi Friends,  
i was working on an script using ironpython 2.7 on Revit\_2020 (has some windows messages to help the user to use it easily) and now i am trying to run it on Revit\_2023 , i faced an issue that the script give me the error appears in the attached photo [i already installed ironpython2.7 as required but it seems the problem with reading the system files not with ironpython , any help or guide will be extremely appreciated.  
Thanks in advnace.

![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/c/fce62e9da5a21f29d838b940d265725cc7ba3119.png)

 ![3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/b/bbd1ba54536223ca4efe345c458eec89ed358eb9.png)

---

<div class="post-metadata">

**Author:** ![eng.minamaged](https://avatars.discourse-cdn.com/v4/letter/e/8491ac/32.png) [@eng.minamaged](https://forum.dynamobim.com/u/eng.minamaged)\
**Post date:** [March 26, 2023, 7:03am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/2 "2023-03-26T07:03:26Z")

</div>

Use DsIronpython package

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [March 26, 2023, 7:10am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/3 "2023-03-26T07:10:03Z")

</div>

Hello @hanywillim …doesnt looks like its the newest dynamoiron package it should be 2.5…try this one and see it could help…dont think dsiron package is necessary…[Python 2.7 in Dynamo 2.13 - #5 by solamour](https://forum.dynamobim.com/t/python-2-7-in-dynamo-2-13/75616/5)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [March 26, 2023, 7:40am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/4 "2023-03-26T07:40:31Z")

</div>

PS does it work if you run with python 3 engine ?

---

<div class="post-metadata">

**Author:** ![hanywillim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hanywillim/32/155832_2.png) [@hanywillim](https://forum.dynamobim.com/u/hanywillim)\
**Post date:** [March 26, 2023, 11:52am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/5 "2023-03-26T11:52:14Z")

</div>

hi Sovitek,  
it seems it is not an Ironpython issue because the other nodes in python is working just the one which depends on the winform message, and the error is showing that it can not read System.windwos.Forms which something related to .NET framework

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [March 26, 2023, 11:59am UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/6 "2023-03-26T11:59:30Z")

</div>

Hi, @hanywillim

Can you share your code here ?

---

<div class="post-metadata">

**Author:** ![hanywillim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hanywillim/32/155832_2.png) [@hanywillim](https://forum.dynamobim.com/u/hanywillim)\
**Post date:** [March 26, 2023, 1:56pm UTC](https://forum.dynamobim.com/t/system-windows-winform-with-ironpython/87825/7 "2023-03-26T13:56:40Z")

</div>

I shut down Dynamo, Revit and Windows and reopened them all again and it seems everything works as expected.

Thanks everybody for your time. ❤
