Revit Python in Visual Studio Revit Stubs 2022 for Python Revit Intellisense

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 through a Visual studio Community 20220 CLONE in Visual Studio Community 2002:





Adding the references to Visual studio:

Tools>Options and:

Add Stubs Path to the top-level folder containing stubs(4) along with the Autodesk revit generated Stubs(5) and some GIT HUB Cloned Iron Python Stubs(6) and the general iron python stubs (7)(see below):


STUBS PATH:

C:\Users\rallen\source\repos\ironpython-stubs\release\stubs

SEARCH PATHS:

C:\Users\rallen\source\repos\ironpython-stubs\release\stubs\Autodesk
C:\Users\rallen\source\repos\ironpython-stubs\release\stubs\DSCore
C:\Users\rallen\source\repos\ironpython-stubs\release\stubs\IronPython
C:\Users\rallen\source\repos\ironpython-stubs\release\stubs\Revit
C:\Users\rallen\source\repos\ironpython-stubs\release\stubs\RevitServices

NOTE:

 %userprofile% didn't appear to work in the settings an the Semicolon ";" was easiest to separate the values. Next check the semicolons were changed to linefeed/breaks for readability.

See also https://www.enjoybim.de/2019/01/18/mit-intellisense-dynamobim-custom-nodes-erstellen/ for VS 2018

Adding DLL references to Visual Studio Community 2002 to see if they pick up in Python:



Comments

Popular posts from this blog

Revit area plans adding new types and references (Gross and rentable)

Powerpoint countdown and current time in slides VBA

Revit 2019 and up tab colorizer