How to export view to DWG with all links merged?

Hello everyone,

Using Dynamo I’ve tried to export from Revit to .dwg one single view , but every link in Revit is exported also as a Xref , and i want to be one single instance of .dwg of the view.

This is what i’ve done :

What am i doing wrong?

Thank you in advance!

…and please share the .dyn file and preferably the code as text in the forum, It helps all of us that might be able to help you if we not have to retype/remake everything from scratch.

in the def ExportDwg() you need to define the specific options for making sure that files get merged into one instead of attached as references. Here’s the appropriate API reference for that setting:

so add this after the options = DWGExportOptions()

options.MergedViews = True


Thank you!

It Works just fine except the .dwg file is to large.
There is a possibility to export at a smaller size?