Add .dll reference to get the Intellisense

@Sylvester_Knudsen1 thats as far as I got; I don’t use IDE’s with Python only C# to be honest. However, I have looked into this (finding an IDE for IronPython) before as a means of supporting some new Python users I work with, but the arduous problems I encountered when attempting to load the RevitAPI put the whole thing to bed and I haven’t tried since. It’s why we didn’t use one in the Python workshop a few week’s ago; it opens up a can of worms and is half-baked at best!

If anything, I would recommend using Sublime for the time being, and stick with VS for viewing the RevitAPI/UI and Dynamo libraries as I taught - its about as good as it gets until someone can find a solution.

@Konrad_K_Sobon that’s interesting. Is this verified anywhere? It would be good to get some input from the Dynamo developers on this? I’m surprised by how chronic this problem is and the hindrance it causes. …glad to see I wasn’t alone with the frustration it causes at least.

I think it will be more helpful if you provide more details and tell us at which step do you have an issue? :slight_smile:

1 Like

This feels like it may partially be due to the hindrance of an open source program (Dynamo) being hindered due to the reliance on a close source (Revit) software @Konrad_K_Sobon spoke of on his blog awhile back…

We are talking about Revit API libraries so Dynamo developers can’t do anything about this. Also, there is nothing wrong with a DLL containing a lot of stuff, so I am not sure i would want to bother anyone with this anyways.

The “running out of memory” is not a problem with the DLL, but with pyCharm or Atom. Each of these IDEs has a number allocated for how much stuff it keeps in memory when dealing with AutoComplete. @Gui_Talarico hints at that in his instructions on how to get his solution installed. pyCharm does the same thing. By default it’s set to 2GB and that is not nearly enough to get RevitAPI and RevitAPIUI stubs loaded and good to go. Problem is that even with that number cranked to 10GB it will not handle the whole thing, and that goes back again to what @Gui_Talarico hinted at with Jedi just being a massing resource hog. He also suggested that instead of trying to crawl the whole library we should perhaps use truncated stubs and save our computer resources.

@Thomas_Mahon yes, it’s verified. I am running auto completion in pyCharm for RevitAPI, Revit APIUI and all other Dynamo libraries. It uses the same method that @Gui_Talarico posted - generator3 to create stubs, then load them into pyCharm - but since it’s a little finicky I wasn’t planning on posting it until i figure out a sure fire way to make it work every time. Also, I am on a pyCharm pro, and haven’t gotten it to work on the free version yet, so that’s part of the issue as well. I need to figure out if there is a correlation between that.

I’m trying with Microsoft Visual Studio and an IronPython Application, but is not possible to use de RevitAPI and/or RevitAPIUI references. The Solution Explorer display something like an error/alert icon.

Any idea?

SOLUTION - PART 2… here is the explanation how to do it :slight_smile:
I have marked @Gui_Talarico as giving the solution. Since this thread came from the Python IDE post concerning lightweight IDE environment especially VSCode and not issues concerning Visual Studio…

Just to follow up… I have got a solution and a special thanks go to @Gui_Talarico and @Kulkul
Step by step guide ->

The essense of making @Gui_Talarico stubs running ( Add .dll reference to get the Intellisense ) is that IronPython doesnt support the solution!

You need to install “native” Python ( )
I took the 2.7.13 version, but the 3.6 version should work also…

My settings in VSCode ended up like this:

    "python.linting.enabled": false,
    "python.linting.pep8Enabled": false,
    "python.pythonPath": "C:\\Program Files\\Python27\\python.exe",
    "python.autoComplete.extraPaths": ["C:\\Users\\erfajo\\.vscode\\stubs.min"],
    "python.autoComplete.preloadModules": [

The important part is the “python.pythonPath” and “python.autoComplete.extraPaths”. The rest of it I copied from @Gui_Talarico while he had that in his settings… they should not be needed :slight_smile:

Thats that… so simple… but only if you are a real good coder you would figure that IronPython didnt support the solution… I would never have guessed that, so thanks a lot to both @Gui_Talarico and @Kulkul


Here’s what I have for pyCharm:


Interesting. I thought these were specific to the Interpreter that you are using. So if you create a new project and use the same IronPython interpreter that should point at the same binary library. Only when you switch to a different interpreter it creates a new folder location for binary skeletons.

Does your solution work for the community edition as well?

It was tested on Community Edition. Bear in mind that this is not ideal. I would give it a try, but .NET libraries are notoriously not well integrated with Python so this might be a superficial fix/help.

1 Like

Hi all, thanks for all the info on this, but for some reason it’s not working for me and I have no idea why:

For vscode I have already:

  • Installed python extension
  • Download ironpython stubs (made sure files were unblocked)
  • Amended settings as per @Gui_Talarico’s settings

I’m not sure why the intellisense isn’t working, I know this has already been discussed, but if anyone can spot something I’ve done wrong I really would appreciate it:

"python.linting.pylintEnabled": false,
"python.linting.enabled": false,
"python.linting.pep8Enabled": false,
"python.pythonPath": "C:\\Program Files\\Anaconda3\\python.exe",
///"python.pythonPath": "C:\\Program Files (x86)\\Python\\Python36-32\\python.exe",
"python.autoComplete.extraPaths": [
"python.autoComplete.preloadModules": [




Hi @Tom_James

Copy Python2.7 to C:\Python27 folder location and download the ironpython stubs in C:\Test folder. Finally Copy these settings in the VSC:

"python.linting.pylintEnabled": false,
"python.linting.pep8Enabled": false,
"python.pythonPath": "C:\\Python27\\python.exe",
"python.autoComplete.extraPaths": [

Here is the process in action:


Thanks @Kulkul you’re a star, not sure why it worked as I just moved everything from the paths above directly to my C drive. Too long a path maybe?

Works anyway, thanks very much,


The problem is not the stubs files, mine are located [ “user”\.vscode\stubs.min ] and mine works perfectly.
The python installation is problem. Placing that somewhere else than what is suggested will give you trouble. I did the exact same mistake initially :slight_smile:
Meaning “python.pythonPath”: “C:\Python27\python.exe” is mandatory somehow if you dont want to do a lot of editing :slight_smile:
By the way, dont use Python 3.6 since it is syntactically different than Python 2.7
AND install x64 bit version!

Hi guys.
I was trying Konrad’s tutorial on how to get the autocomplete in pycharm and, I was just wondering what you guys mean by stubs?
What is it exactly that I should copy into the folder and where do I get it? I get the feeling that it’s not the DLLs themselves since the stubs folder doesn’t contain any DLLs.

you can find the stubs here

as written by @Konrad_K_Sobon in this post

I have struggled to create Python Code for Dynamo Nodes using the RevitAPI with Visual Studio Community 2015 and Sublime, but it seems it works now with Visual Studio Code. So I have created 2 small tutorials:

How to install Visual Studio Code to Create Python Code with Autocomplete/Intellisense [including the RevitAPI.dll]:

  1. download the stubs from :

  1. unblock the zip file after download:
    a) right click on the zip file, properties:
    b) unblock the file:

  2. extract to a folder of your choice on your computer (eg. with WinRar) - recommend is into C:\Test:

  3. Install Python 2.7.14 64bit (recommend to the path C:\Python27):

[info: Dynamo us using IronPython, but it seems that IronPython is not supporting the Autocomplete function, because of this we use Python2.7.14 to create the Python Code we use later in the Python Node in Dynamo]

  1. Install the software Visual Studio Code:
    [further details to Visual Studio Code: & ]

  2. Open Visual Studio Code and install these Extensions by using the search bar at the top (Erweiterungen [in german]) :
    [further details: ]

  3. To open the user settings use the keyboard combination CTRL + , [in german: STRG + ,]
    Add the following lines to the user settings and adjust the path to your stubs.min folder and your python.exe file:

    “python.linting.enabled”: false,
    “python.linting.pep8Enabled”: false,
    “python.autoComplete.preloadModules”: [
    “python.pythonPath”: “C:\Python27\python.exe”,
    “python.autoComplete.extraPaths”: [“C:\Test\ironpython-stubs\release\stubs.min”],

  1. Save your settings and restart Visual Studio Code

*How to explore .dll libraries in Microsoft Visual Studio Community 2015:

[The result of this is similar to to explore the Revit API, but offline]

Install Microsoft Visual Studio Community Edition 2015… (not further described in this tutorial, use google)

Open the object browser in Visual Studio Community ( Menu: View -> Object Browser )


Create a Custom Component Set:


Add the dll libraries you want to explore:


for example you can add to the object browser:

• ProtoGeometry.dll ( C:\Program Files\Dynamo\Dynamo Core\1.3\ProtoGeometry.dll )
• DynamoServices.dll ( C:\Program Files\Dynamo\Dynamo Core\1.3\DynamoServices.dll )
• RevitNodes.dll ( C:\Program Files\Dynamo\Dynamo Revit\1.3\Revit_2018\RevitNodes.dll )
• RevitAPI.dll ( C:\Program Files\Autodesk\Revit 2018\RevitAPI.dll )
• RevitServices.dll ( C:\Program Files\Dynamo\Dynamo Revit\1.3\Revit_2018\RevitServices.dll )
• DynamoRevitDS.dll ( C:\Program Files\Dynamo\Dynamo Revit\1.3\Revit_2018\DynamoRevitDS.dll )


is the setting compatible with the python 3.6? I did the steps in vscode but I get some errors. I don’t know if it is for the python version I am currently using(v3.6).

You cannot use Python 3.6 (and neither Python 2.7)
You can only use the .net Python flavor IronPython 2.7.3, which in syntax is similar to Python 2.7 versions, but be careful, you cannot use numpy!

1 Like