How does clr module work in Cypthon engine of Dynamo

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 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.

CPython3 engine use the pythonNet bridge project (currently 2.5.2) to call the CPython interpreter.

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

unfortunately, I think this is not possible or not easy

related topic

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.

1 Like

Once you have your stubs
image

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:

    "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