Issue with Print PDF in Document node (GeniusLoci)

@Alban_de_Chasteigner

Hi there, I’m having an issue with the Print PDF In Document node, it returns null no matter what I try. I’ve even given up using lists and am trying to PDF just a single sheet. Our goal is to have a 1-click PDF option that looks at a sheet list with linked sheets, gathers sheets from multiple models and PDF them, then merge into a single PDF.

Is the limitation of Linked Models just limited to links of the current document? Or is it ANY document that is linked into any other? Trying to figure out if what I’m trying to achieve is even possible.

The process I’m trying:

  1. Close all Revit models.
  2. Open a completely separate, “test” model (that isn’t linked into anything and has no links)
  3. Run script:

The way I have the script set up:

  • the user first selects a “host” model filepath, it opens it in the background and reads the sheet list (which contains linked sheets)
  • It then finds sheet numbers from that list and looks them up in a master sheet list that contains the field for RVT Link Filenames. If it finds a filename, it finds the filepath and opens the files in the background. If it’s blank, it uses the first host model document
  • It then gathers sheet elements from either the host model or the linked models
  • Creates filenames and gets print settings
  • Attempts to PDF the documents (I have Adobe PDF set to not prompt for filename)

Keeps returning nulls even with single PDF, no matter the lacing. Any help would be appreciated!!!

Running:
Revit 22.1.21.13
Dynamo 2.12.0.5740
GeniusLoci 2022.3.9

Hi @steinah6,

It’s complicated to help you because I don’t see the names of the nodes nor the previews under the nodes.
In addition you mention linked files while PDF printing only works with Revit files open in the background.
Simplify your graph by removing the interface and test with the most simplified Revit file possible and see if it works.

So I was able to fix my script and it works now. I was giving the node one document for each view but it wants one document for each list of views. Also I was giving the node one printer name for each view, but it only wants one printer name no matter how many views or lists.

For the linked model issue, I had to stagger the PDF creation by PDF’ing the host file, then closing it in background, then a passthrough/wait, and then opening the linked files and PDF’ing them in a separate node.