How to Solve NameError: name 'Revit' is not defined

Solution: Import the 'Revit' module

To Solve the error, add the following line to the top of your code.

import Revit

 

For more information:
Python Revit