How to Solve NameError: name 'DocumentManager' is not defined -- RevitServices
Solution: Import the 'DocumentManager' module
To Solve the error, add the following line to the top of your code.
from RevitServices.Persistence import DocumentManager
For more information:
Python RevitServices DocumentManager