Accessing Autodesk.Revit.DB.Document from Dynamo

I am rewriting some Revit API C# code for a ZeroTouch Package.
I Need to Access the Autodesk.Revit.DB.Document object in order to draw XYZ vectors based on an algorithm.
The Document object in Dynamo is NOT the same Document object,
The Document.Current object in Dynamo corresponds to Revit.Application.Document.
I tried parsing the DynamoRevit-Revit2016 code, but could not find anything useful or did not understand it.
Could someone pls give me a pointer?

Does DocumentManager.Instance.CurrentDBDocument not work?

1 Like

Is DocumentManager a class in Revit?
Where can I find it in the Revit API?

DocumentManager is not part of the Revit API.
It’s part of Dynamo Revit, and it’s what Dynamo uses to get to the Document (instance of a Revit Document Class)


yes thanks, I managed to get this going yesterday using a Python script, which I found on
Your answer confirms this method of accessing Autodesk.Revit.DB.Document.

1 Like