# How does clr module work in Cypthon engine of Dynamo

**URL:** <https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717>\
**Category:** Revit\
**Tags:** dynamo, cpython3\
**Created:** [November 22, 2023, 5:24am UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717 "2023-11-22T05:24:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NIRMAL](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nirmal/32/150135_2.png) [@NIRMAL](https://forum.dynamobim.com/u/NIRMAL)\
**Post date:** [November 22, 2023, 5:24am UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717/1 "2023-11-22T05:24:26Z")

</div>

Hi all,  
I am curious to know how does clr module is imported in Cypthon engine of Dynamo as in latest versions.  
I looked for something similiar in the internet and I found out that using these [ironpython-stubs](https://github.com/gtalarico/ironpython-stubs) we can use autocomplete in external python editor.  
but question is same if ironpython has been removed from dynamo then how does it import clr module in Cpython engine.

---

<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:** [November 22, 2023, 7:50am UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717/2 "2023-11-22T07:50:03Z")

</div>

CPython3 engine use the [pythonNet bridge project](https://github.com/pythonnet/pythonnet) (currently 2.5.2) to call the CPython interpreter.

---

<div class="post-metadata">

**Author:** ![NIRMAL](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nirmal/32/150135_2.png) [@NIRMAL](https://forum.dynamobim.com/u/NIRMAL)\
**Post date:** [November 22, 2023, 10:41am UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717/3 "2023-11-22T10:41:24Z")

</div>

Thanks for replying Cyril,  
This might sound a second question but I really want to know it. How do I use this pythonNet git repository to be able to code in visual studio code so that I am able to use the auto complete feature when using any method or property of a class from Revit API or any other dll.

Warm regards  
Nirmal

---

<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:** [November 22, 2023, 10:44am UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717/4 "2023-11-22T10:44:48Z")

</div>

unfortunately, I think this is not possible or not easy

related topic

> [@Edit Revit Dynamo Python in Visual studio community](https://forum.dynamobim.com/t/edit-revit-dynamo-python-in-visual-studio-community/80552):
>
> The stubs export- I am missing something. I got back to the original posters stub reference here: Cleaned up the previous posts and this is mostly working… Revit Python in Visual Studio Revit Stubs 2022 for Python Revit Intellisense [September 01, 2022](https://revittricks.blogspot.com/2022/08/revit-python-in-visual-studio-revit.html) Coding in python and fighting the #Autodesk Python basic editor with all the Case Sensitive syntax I decided to use Visual studio to code/debug. Problem is I was missing stubs. Grabbed them from the [gtalarico GIT iron python stubs](https://github.com/gtalarico/ironpython-stubs) through a Vi…

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [November 22, 2023, 11:19am UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717/5 "2023-11-22T11:19:41Z")

</div>

Check out this blog post - I used this to get stubs for Revit, Dynamo and Civil3D. Hint use the clr references and look for the .dll files with the same names, usually in the main program directory.

> **[Create Python stubs 🐱‍👤](https://www.macro4bim.com/post/create-python-stubs)**
>
> In a post of some time ago, I talked about the implementation of intelliSense and autocompletion of your Revit code using Visual Studio Code. VSCode intelliSense for Revit As you can see from there, a side note is alerting you that, depending on the...

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [November 22, 2023, 12:28pm UTC](https://forum.dynamobim.com/t/how-does-clr-module-work-in-cypthon-engine-of-dynamo/95717/6 "2023-11-22T12:28:35Z")

</div>

Once you have your stubs  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/d/4d2d225d1227aef05fcab76fe16e00bd8198bfbe.png)

You add them to VS Code in the settings.json file - I usually only have them in the workspace for Autodesk related projects as follows:

```json
    "python.analysis.extraPaths": [
        "C:\\<path to stubs>\\Stubs",
    ],
    "python.autoComplete.extraPaths": [
        "C:\\<path to stubs>\\Stubs",
    ],

```

Analysis is for Pylance linter & syntax highlighting and autoComplete is for Python  
Note: Use the main version of Revit / Dynamo that you currently use
