Autodesk Revit and Dynamo library

Hello friends
I want to import Autodesk revit And dynamo library into VScode so when I’m coding, syntaxes show after “.” as same as python script node’s Environment in Dynamo.
Can anyone help me how to download and import library into VScode ?

hi!

If I understood correctly, you are trying to import the Revit and Dynamo API’s in VS and develop your custom package there?

Here’s a sample import, in this case it’s C#:

using Autodesk.DesignScript.Geometry;

// load Runtime module in order to use the MultiReturn attribute : more info on multiple return values in the Dynamo Primer
using Autodesk.DesignScript.Runtime;

// load Revit API
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

// load Dynamo API
using Revit.Elements;
using RevitServices.Persistence;
using Revit.GeometryConversion;

Please note, you would need to reference the API first. There is also lot of information on the topic, as well as step by step tutorials in the Dynamo primer:
https://developer.dynamobim.org/03-Development-Options/3-4-zerotouch-nodes.html

Cheers!

Check out this blog post using a helper app from pyRevit to create python stubs

Once you have your folder add it to AutoComplete Extra Paths and Stub Paths in VS Code settings