Export and merging PDFs

Hello everyone,

I am developing a dynamo script and it’s pretty much complete. However, the missing step is:

  • Exporting a set of selected views automatically (giving names without human inputs and saving) to PDF files.
  • Merge the created PDF files into one PDF file, containing all the views.

Here are my questions:
1 - I have experimented with the GeniusLoci node to Merge PDFs but it says that the document has no pages. How can I fix/circumvent this issue?

2 - Is there a way to use the “Select” print range while naming and saving files automatically?

3 - Is there a way to turn on the printer software so that it’s ready to go when the PDF exporting commences?

Dynamo script bellow:

All files involved in this process:
bars.xlsx (23.8 KB)
nodes.xlsx (16.6 KB)
structureV16.dyn (853.4 KB)
Template.rvt (3.4 MB)

Any feedback is appreciated. I’m fairly new to Dynamo and this forum has been so valuable in the help and tips received and I can only thank you all for this :slight_smile:

What version of Revit are you working in? In 2022 they greatly improved PDF exporting.

Hello and thank you for your reply,

I’ve noticed that the 2022 version has a lot of PDF export settings.
However, I’m currently working with Revit 2020 as it is the version that the company I work with uses.

Kind regards,

Hi,

Depending on the number of sheets to print and your virtual PDF printer, one PassThrough node may not be sufficient.
You should add a Thread.Pause node to be sure that all the pdf files have been created before merging.

Hello and thank you for your reply,

I tried the method you referenced and it didn’t return the expected results. Maybe I did something wrong/differently but I’m not really sure of what I did wrong exactly.
Currently I don’t have my laptop with me but I’ll get back on this topic on Monday. I just have these questions that I wanted to ask

Kind regards,

Hello again and I’m sorry for the lack of response from my end, I had some personal issues that I needed to deal with.
I have implemented the pause node with a 15 second gap and the MergePDF node returned this warning:

“Warning: Merge.MergePDFs operation failed.
Access to the path ‘C:\Program Files\Autodesk\Revit 2020\Success’ is denied.”

How can this be fixed?

Here’s the updated script:

.dyn file:
structureV16.dyn (856.2 KB)
Revit Template:
Template.rvt (3.4 MB)
Excel files:
bars.xlsx (23.8 KB)
nodes.xlsx (16.6 KB)

Kind regards,

Hey,

Could you zoom in a little more when creating an export so we can read the node titles and such

Hello and thank you for pointing that out. Already replaced the image

Hello everyone,

Here’s an update regarding the situation:

  • Made use of Alban’s PDF export script and incorporated it into my own.
  • Created names automatically for the PDFs that were created.

Right now, the only part that’s currently missing is the PDF Merge procedure.
Like I mentioned before, the PDF Merge node gives the following warning:

“Warning: Merge.MergePDFs operation failed.
Access to the path ‘C:\Program Files\Autodesk\Revit 2020\Success’ is denied.”

How can this be fixed?

Kind regards,

Have you tried a different folder?
Sounds like it doesnt have write permission or something or its in use…

Hello and thank you for your reply,

That was exactly what was missing! It’s working as intended now :slight_smile: