Setup VSCode for Dynamo/Revit

Hello,
I have Issues running code for Dynamo/Revit libraries on VSCode.
Long story short, using the python interpreter (version 2.7.18) the intellisense autocompletes the the Revit/Dynamo modules but the debugger doesn’t pick up the clr.

When setting the interpreter to IronPython, it doesn’t recognize both the intellisense autocomplete of basic python modules or the clr, and doesn’t debbug.

Anybody know how to fix this? This is the most I managed to progress in the issue after quite a lot of time put into it.
PS the IronPython IDE does work and recognize the clr module.

Python interpretor

image
Version of python.


Intellisense autocomplete recognizes the clr module.

The debbuger does not recognize the clr module.

Json Settings

IronPython Interpreter


Does not recognize “import” command.


Doesn’t import the clr library.


Json settings

IronPython IDE


IDE imports clr


Same path to ide as with the IronPython interepreter on VSCode.

Hi,

according to this post, you have to append folders to your system.

after you’ve downloaded the libraries you want to refer,
either simply add a system path into your script,
or add them to the python settings:

1 Like