STUBS from GITHUB for Revit python methods exports

@eshan iran-nehad and @steve baher at McNeel came up with Python stubs Builder - I tried it but ended up using the GIT Iron Python Stubs for now.


https://github.com/mcneel/pythonstubs on GIThub. The lnk goes through the process of setting up stubs based on the revit version. The original how-tom came off Macro4BIM - but there were a few missing steps and I automated things a bit. 

My Stubs was installed with PyRevit at C:\Users\[USER ID]\AppData\Roaming\pyRevit-Master\bin

Readme on stubs here.


Batch to run for revit 2022 would only run from the PyRevit folder and looks like:
@echo off setlocal set path=%path%;C:\Users\rallen\AppData\Roaming\pyRevit-Master\bin cd c: cd %userprofile%\AppData\Roaming\pyRevit-Master\bin ::The Destination folder is the default folder ::Visual Studio Community 2022 uses for GIT Repos and code storage set Destination="%userprofile%\source\repos\stubs\Autodesk.Revit.R22" ::This is the Source DLL and its SUBFOLDER used by the Stubsbuilder ::to search for additional methods/classes assocaited with the DLL set SourceDLL="C:\Program Files\Autodesk\Revit 2022\RevitAPI.dll" set RevitSearchFolder="C:\Program Files\Autodesk\Revit 2022" :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::PY revit master borrowed form a PyRevint install already on the system ::See https://github.com/mcneel/pythonstubs for base project PyRevit stubs came from! pyrevit-stubsbuilder.exe %SourceDLL% --dest=%Destination% --search=%RevitSearchFolder% @echo complete explorer %Destination% pause




I separated it as I believe the "revit" dump might conflict with multiple versions of revit installed.

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 Python in Visual Studio Revit Stubs 2022 for Python Revit Intellisense