title: How to import Revit and pyRevit librairies with PyCharm?
body: <p>This is my very first question here, hope won't be my last. As I already use some answers from a lot of people, I would like to start by thanking all of you. </p>
  
  <p>Context : I'm developing a module for Revit, and for this, I'm using pyRevit to exchange with the Revit API. pyRevit allow me to code in Python, which I do with PyCharm IDE.</p>
  
  <p>Problem :
  When I try to import libraries, I have a "Unresolved reference" error message. Otherwise, the module is already working on Revit so imports go well when using it.</p>
  
  <p>I already try to add the folder's path to Files --> Settings --> Project Interpreter --> Interpreter path, then mark the folder as a source folder (Right click --> Mark Directory As --> Source Root), then Invalidate Cache / restart.
  Paths are: </p>
  
  <pre><code>C:\Users\***\AppData\Roaming\pyRevit-Master\bin
  C:\Program Files\Autodesk\Revit 2019
  </code></pre>
  
  <p>I also try to add these folders in Files --> Settings --> Project Structure --> Add Content root. Once done, they appear on the project root. Here it is, with the failing imports on the right side (not enough reputation to post pictures so here is a link)</p>
  
  <p><a href="https://imgur.com/U3QWdsm.png" rel="nofollow noreferrer">Project structure and red imports</a></p>
  
  <p>So everything is flagged as "Unresolved Reference", even the System import.
  How can I help Pycharm to read these libraries correctly, delete all import errors and ease auto completion and development ? I wonder if Revit libraries are protected but in this case, it should work with pyRevit and System, at least.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>UPDATE : After having added Pyrevit folder to the project strucute AND mark it as Source Folder AND click on Files --> Invalidate caches/restart, the import of pyRevit is OK. Great News.</p>
  
  <p>For the Revit folder (and also for Microsoft .NET libraries like mscorlib (for List)), I assume it fails because they are compiled from C# language. Is there a way to import libraries in C# with a Python IDE, or at least, recognize the internal structure and the functions names ?</p>