BatchExport DWF. Linked Files

Hi everyone,

I am already using steam node node "Tool.ExportDWF"l to batch export my sheets in DWF from my model.
It works perfectly and make me save a lot of time

My idea : picking up sheeets in my linked files with “Get.Documents” and “Element.GetFromLinkedFile” and then Input this list result in tha Tool.ExportDWF.

Result of this operation is False.

My question is : does this node could work also with linked files ? If so, is it necessary to make some modification in the node ?

Looks like you’re not getting any sheets from your link…

Until “Tool Export DWF”, all the nodes collect perfectly sheets in linked files and put it in a list
But then the script of the “Tool Export DWF” node seems not to understand this list of sheets.
Maybe the node isn’t able to understand this list because its content come from a linked file…

No solution until today :slight_smile:

I’m just saying your preview shows null.
What version of Dynamo are you using? There’s a newer version of Tool.ExportDWF. Try installing the package update.

Hi @CICAD Xavier,

I have a solution for your request.
If you refer to these topics : Exporting CAD or PDF without opening REVIT and Export Sheets from Linked Models, you can use an “opendocument” node to collect your sheets.
And with a python script you will be able to export your dwf :

#Inspired by Node Export to FBX
#From mostafa el ayoubi, 2016

import clr
from Autodesk.Revit.DB import*
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = IN[4]

t = Transaction(doc,'export')

def tolist(input):
	if isinstance(input,list):
		return input
		return [input]

folder = IN[0]
prefix = IN[1]
views = tolist(IN[2])
result = []
vset = ViewSet()

for v in views:

options = DWFExportOptions()
options.MergedViews = IN[3]

OUT = 'Success' 

If you create a custom node like in the picture above and use lacing, you can also input multiple revit files.


Amazing Alban !

Only, on your screen shot you’re feeding your custom node in the wrong order (Directory path in filename input, Sheets in directory path input, Document in Views input…)

I’ve also tried your graph and it also works with multiple files as input. Important to notice that you need to lace Longest your custom node !


FIY Alban creates a package called Genius Loci dealing about batch exporting NWC,DWF, IFC, CAD and PDF without opening revit files. This package combined with @Data-Shapes package provide you a wide range of possibilities for batch exporting anything you want from your revit with a minimum of effort.

Congrats guys !


I was successful with the short version of “Export from directory” from GeniusLoci Package, but when i try the one with Export setup option node. I got an error. it only work with one link doc. export%20doc%20link

Hi @seth09,

To work with multiple documents Revit, the nodes Export DWG / Export DWF / Export NWC / Print PDF from directory must be set with lacing longest.

The input for “Exportsetup” is the name of the ExportDWGsettings like in the picture below :

Keep me informed if you have other problems.

It was successful, when i use your “ExportSetup” method for input. It was the lacing order in my output ExportSetup.


Other Question. Is there away to retrieve the exact export “Sheet/view” from link doc? Refer image. If I can retrieve the “AutoCADBase Export” “all views and sheet in the Set” as view/Sheet list

Hi @seth09,

You can use “Element Types”,“All Elements of Type in Document” from Rhythm and “ViewSheetSet.Views” from Clocwork or use a python script to get your sheets from View Sheet Set.

#Copyright(c) 2015, Konrad Sobon
# @arch_laboratory,

import clr
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = IN[0]

# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *
import System

vs = FilteredElementCollector(doc).OfClass(ViewSheetSet)

OUT = [i.Name for i in vs],[i for i in vs]

Thank you very much. Okay hopefully it is related. I keep having link models warning because it have more then 20 miles. Is there a way to unload link model in the link document file?

You are now far from the original subject !

Yes you can but be careful, the python script below unload all the links.

#From Ben_Osborne
import clr
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.Attributes import*

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

import Revit

dataEnteringNode = IN

doc = IN[0]

for rli in linkcollector:
OUT= 0

You will also need to save the document like in the picture.

Much appropriated and sorry for go off subject. Now back on subject. my View.SheetSet.Views node have an error because the “Turn into list” node is saying dynamo version in compatible. Is there a new Turn into List or way to modify the “View.SheetSet.Views” node?

1 Like

You can update Clockwork or you can copy the python script from the node “View.SheetSet.Views”.
The input for the python script will be a list.
Maybe you will need a “List.Create” node or a List.GetItemAtIndex node before the python script.

Thanks for your help with this topic.

Hi Alan

I were trying to export dwg from multiple revit files without opening them,i tried the similar steps given here but i couldn’t get the exact result i wanted.
When i am export dwg, the file name and other conditions are getting correct only. but the view inside the dwg file is not from the directory file, instead of that its getting from the currently opened file. The flow is given for the reference.Hope you can help me…

There are been somes changes in the Rhythm package larely. The Export DWF node expects a Revit.DB.Document and not a Dynamo Revit.Application.Document.
Use the new Rhythm Documents.DynamoDocumentToDbDocument node to perform the “conversion”.

Hi Alban

That worked and its cool.much appreciated for the instant help…