Could not load file or assembly 'RevitAPI' Error in Vscode using Python
Hi Everyone,
I am trying to build my first Revit plugin in Vs code using python but unable to import any Autodesk Packages, I am facing the below error can anyone please help me in resolving these issues. I have followed this link for installing the required Tools 'https://www.youtube.com/watch?v=88zIQCZw8BA' Thanks in Advance.
**CODE IS:-**
**import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
print('success')**
Exception has occurred: FileNotFoundException
Could not load file or assembly 'RevitAPI' or one of its dependencies. The system cannot find the file specified.
File name: 'RevitAPI'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Python.Runtime.AssemblyManager.LoadAssembly(AssemblyName name)
at Python.Runtime.CLRModule.AddReference(String name)
**Please Note that I have successfully installed the Autodesk packages using command in vscode terminal:**
**pip install clr
pip install Autodesk
pip install Revit**
[enter image description here](https://i.stack.imgur.com/Glln4.png)