It all depends on what you want to do. @jacob.small suggestion cant be used with zero touch nodes and is only avialable if you are writing Revit addins which implement IExternalCommand.
So you need to establish the following: does your node even need the document as an input? Some custom nodes do have the document as an input in case where they support links for example, but this is a nuisance since these packages also need to add extra nodes to return the RevitAPI document like what @Alban_de_Chasteigner demonstrated as there is no way for developers to create an instance of Dynamo’s Revit.Application.Document
document wrapper as its a singleton (uses the singleton pattern) and therefore has no public constructor.
The problem with returning RevitAPI entities in Dynamo is they are not compatible with any OOTB node or most other packages which means any OOTB node requiring a document will fail in the same way your node is failing if the RevitAPI document from a custom node is used with an OOTB node…which is extremely confusing to most users who are not going to be concerned with these nuances.
If you don’t need the input, then you can access the document via Dynamos singleton stored in its DocumentManager class. This is the most common method zero touch and python nodes use to access the active document, and you can simply add this line inside your method and therefore avoid the need to provide an input:
var document = DocumentManager.Instance.CurrentDBDocument;
Alternatively, if you do want to provide the document input then you need to qualify the class or use an alias using directive which specifies Dynamo’s document wrapper as shown below, but its kind of pointless given the above basically does the same thing but avoids the need for an input:
public static Dictionary<string, object> GetCoordOfRevitBasePoint(Revit.Application.Document doc)