Can you do it on one file yet?
If not, start there. If you’re stuck there, post what progress you have made.
If you can do it with one file, what part are you stuck on with many?
It’s hard to give decent advice without better context.
This is opening the files, but you aren’t interacting with them.
In order to work with background open documents you need to utilize only nodes which have a document input. These are few and far between as background processing isn’t super stable, and can be rather difficult to work with. Look into the orchid package for some additional tools.
You need to have a document input into the Element.ByCategory node, as that element will vary project to project.
Orchid may have something for this, or you can look into other means of automation.
A python based route to open a file, get the project info, set the parameter, and close the file.
Journal automation to run the .dyn on multiple rvts via drag and drop.
Revit Batch processor.
A paid add-in.
Etc.
As noted above, background processing with Dynamo is difficult. Not impossible, but difficult. Each and every node which gets or sets information from a Revit model will require that you have a document input.
I resorted to using Python to perform the actions I need in multiple files, this would be the framework that works for me.
import clr
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import System
from System import Array
from System.Collections.Generic import *
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = uiapp.ActiveUIDocument
paths = IN[0]
for path in paths:
fd = app.OpenDocumentFile(path)
transaction = Autodesk.Revit.DB.Transaction(fd)
transaction.Start("First Action")
# Do what you need with the document
transaction.Commit()
t2 = Autodesk.Revit.DB.Transaction(fd)
t2.Start("Second Action")
# Do what you need with the document
fd.Regenerate()
t2.Commit()
fd.Close(True)
OUT = paths
I would say as Jacob, BVN (RVT exporter) and other tools is better than BGopen with nodes in my opinion…I love to use Birdtool very similar to BVN tool just without the option to batch run with windowstaskscheduler as BVN support…but think Birtool is a little bit faster as it actuelly are in a open document when run.where BVN has to open close the document from scratch…but both great tool and great option to BGopen…PS Birdtool can run on BIM360 as well