Exporting CAD or PDF without opening REVIT

Hi to All,
We are working in a residential project which have 6 different buildings (Block) in it. We have sepererated the revit files according to these blocks. Each block has its own sheets, schedules, areas in revit.
When we need to publish these sheets for coordination, we open revit files one by one and export sheets to CAD and PDFs.
This process takes too much time. If we had a tool like etransmit or batch print that will work without opening revit project, we will just push a button and all related cad and pdf files would be ready.

Do you think it is possible by using DYNAMO?

Hi @cenkerkocoglu

Welcome on Dynamo forum!

Show us some work please. This is a help forum to ask for help with things that you cannot figure out on your own, but actually tried. Read this how to ask help

Thank you Kulkul,
I really do not know how to use Dynamo. I will start to learn it. I am just asking if it is possible to export.
Kind Regards.

Very interesting topic…i think this is possible only when the revit model is open in the background. Anyways i am also interested to know if this is possible. Imagine you can do this task at the background…

Hi,

Use Google and search for DynamoAutomation by @Andreas_Dieckmann
And have a look overhere.

Here are some of his scripts.
MasterSimple_End[1].dyn (18.1 KB)
MasterSimple_Start[1].dyn (15.0 KB)
SlaveMain_End[1].dyn (29.0 KB)
SlaveMain_Start[1].dyn (16.3 KB)

Good luck
Marcel

5 Likes

Thank you. It’s very usefull. I will try it but ı hope there would be another way without opening it. In autocad, you can handle it with batch print without opening cad files.

Hi,

All geometry in revit will have to be generated before you can print it i presume.
Therefor the file has to be opened.
So what you are asking is impossible.

impeccable logic Mr Spock (James T. Kirk)
Marcel

Thank you for the information. I hope someday it will be possible.

Hi @cenkerkocoglu , I think it’s actually possible through background open . You can export pdfs and dwg automatically . Check out this topic :
Export Sheets from Linked Models

3 Likes

@Marcel_Rijsmus,

There are two ways of “opening” a Revit file. One is with the UI and one without it. One can open Revit in the background without loading up the UI. It’s much faster and can be used for what the OP is asking.

4 Likes

@Konrad_K_Sobon

Thank you.
You learn something new every day in the world of Revit :slight_smile:

Marcel

2 Likes

Thank you to all. I need to learn dynamo asap. Its good think to know that can be achieved.
It woud be great if you can share some other links. They are very helpful.
Kind regards.

Dear Mostafa,
I have tried to work on Dynamo to achieve the batch print.
But here is the result :slight_smile:
Print_PDF.dyn (9.1 KB)


Could you give me a hand?

1 Like

@cenkerkocoglu ,
it doesn’t look like you changed the code and added the input. Please take another look at the link I posted in my previous message.

1 Like

It really works. Thats great. Thank you :slight_smile:
Now i need to figure it out how i can export them in cad format.:joy:

this should do it:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import*

doc = IN[4]

if isinstance(IN[3],list):
	views = IN[3]
else:
	views = [IN[3]]

viewid = [ElementId(v.Id) for v in views]
icollection = List[ElementId](viewid)


dwgOptions = DWGExportOptions()
dwgOptions.SharedCoords = IN[1]
path = IN[0]


doc.Export(path, IN[2], icollection, dwgOptions)

OUT = ''
9 Likes

Thank You,Mustafa
It works and it’s amazing :slight_smile:
I tried to print two different revit files at same time. Combining view lists from two different sheets works but when it comes to document input, it gives warning. Can it work with multible document input?
I have same problem with exporting cad. I can export from one linked files but when it comes multiple links, ı couldn’t do it.
Thank for all your help.
Best Regards.
Print_PDF.dyn (18.3 KB)

1 Like

Thank you Mostafa for your great effort, i just want to ask two questions,one in PDF printing and the other in CAD exporting.

First, How could we select printing range if we don’t want to print all the sheets in the model, how we can select specific sheets for printing.

The other question is, how we can define the layering settings in CAD exporting (The txt file) and make it as input in dynamo process.

Thanks in advance and thanks again for your effort.

Hi Mustafa,

I really appreciate your effort in sharing your knowledge to us.

I have question regarding printing the sheets into pdf. I followed your script and it really works well.
I just want to control the sheets that i want to print using View Sets. How do you think can i insert this in the script?

Thank you very much.

Cheers,
Romm

Just plug the views from view sets stright into IN[3]. Or are you wondering why it’s returning null? If so you need to create view sets in revit first.