PrintToPDF Returns Null/Empty without Errors

I’ve been trying to make a dynamo script that prints the current project set to a printer I have. Issue is Crumples PrintToPDF (Archilab didn’t work either) doesn’t want to actual print. Too my knowledge I’m inputting all required information and its running without error yet no file is getting sent to the printer or even anywhere in my system. I tried using Microsoft to PDF but that didn’t work. I searched other topics but they have either been fixed with something that didn’t fix this issue or haven’t been fixed.

Any help fellas?

It looks like you don’t have a View Set selected. Are you sure you’re providing views to be printed?

Odd how it didn’t print when I exported the entire workspace but yes I did have the view set selected.

I’d suggest pulling out the contents of the custom node and testing in the workspace so you can see what errors you’re getting. You can just edit the custom node, copy everything, then paste it into your workspace and reconnect.

Failure of renaming, I thought it had to do with the view settings so I changed it from creating a view setting each time to the existing one however the error is still there.

InvalidOperationException: Rename of the setting was unsuccessful; this may be because the name is already in use. at Autodesk.Revit.DB.ViewSheetSetting.Sa veAs(String newName) at InvokeStub_ViewSheetSetting.SaveAs (Object, Span 1) at BaseInvoker. System.Reflection.Method InvokeWithOneArg(Object obj, Binding Flags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) [' File "<string>", line 121, in <module>\n',' File "<string>", line 83, in exportSheetPdf\n']

It sounds like you need a unique name each time. Try closing out of the dyn, clearing out your saved print settings, and then reopen and provide a brand new name.

Deleted any existing preset, closed and reopened dynamo, gave it a new name and the result is an empty list and nothing printed at the printer.

Ignore the custom node for now and just focus on the python node. Without knowing what errors are occurring we can’t really diagnose anything. It’s very possible that it’s the same error from before, but we don’t know that without seeing it.

A few other things:

  • What version of Revit are you in?
  • Have you confirmed you’re on the latest version of the package?
  • As another test, confirm that the new print setting is being created. If it is, try printing your two sheets using that print setting via the Revit UI to see if you encounter any other issues.

This script shows the list structure expected for my nodes:

Needs to be 1 file name per sheet (not just 1 for many). Im not sure how those print setting/printer nodes output as well, but my node expects specific types there as well so try using mine.

Plugging in my own directory and printer name, still sadly returns null oddly. Does printing to pdf not work with actual printers? even if so I tried using the “Microsoft Print to PDF” as a printer to not avail so is it both it doesn’t work with printers in real life AND doesn’t work with Microsoft’s pdf printer? Should I go out and install one of these other pdf printing services to see if that works?

I have only ever tried and used PDF24 personally, and have had to configure it also. I cover this here:

Maybe look into my export pdf node as an alternaitve if you are in revit 2022+.

Hmm oddly enough going off the video there appears to be an issue with crumple as the dropdown form nodes don’t engage any UI to appear, I don’t know what could be the reason for this issue perhaps using Revit 2025? The icon for the node is also a snake rather than the typical circled c if that were to mean anything.


Open the custom node up and check if the \node has a warning on a Python node therein.

Not sure where that module originates form - but it’s using IronPython2 so you’ll want to be sure you have the right version installed on your system. Have you confirmed that yet?

After manually installing Iron Python 2.7 and restarting my computer the same error occurs

Two questions:

  1. Which version of IronPython2.7 did you install?
  2. Which version of Dynamo for Revit are you using?
  1. 2.7.12 The latest release from their Github Here
  2. Dynamo Core 3.3.0.6316, Dynamo Revit 3.3.0.6523

You need to install the Dynamo IronPython package off the Dynamo package manager, not the generic one for use in integrations.

In Dynamo check your package list for a DynamoIronPython package. If you don’t have one install the right version of the Dynamo package manager for your Dynamo build. If you do have one, check which version and confirm it’s the right one in the package manager. If so, let us know. If not, remove it, restart Revit, and install the right version.

Sorry, I have 3.2.1 installed in the manager which is the most up to date 3.0 which the package says to have any version with the same beginning integer as the version so since I’m using dynamo 3.x so I should have a Iron Python of 3.x which I do.
image
image