I would suggest you look at the data output from dynamo and to have manually a check of a couple of the revit files you are opening. As you may fine that the data output is excatly the same for each revit file when it should be different(quantity, element ids, etc).
DocumentManager.Instance.CurrentDBDocument - Get has access to the revit file you had opened prior to opening dynamo and associates that document(revit Project) to this.
OpenDocumentFile is a background process and therefore you need to input this doc to get the categories you want via the exportfunciton
This will change it as follows:
Also your “Revit.Elements.category” command will be doing a similar approach to the documentmanager and only getting information from the revit file that was opened prior to opening dynamo. This will mean that it should be changed from a dynamo method to a more native revit way via FilteredElementCollector.
Therefore it would like like the folowing:
.OfClass( FamilyInstance ).OfCategory( BuiltInCategory.OST_Planting )
Some example python code for element collectors can be found here https://github.com/Amoursol/dynamoPython/tree/master/revitAPI