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.
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.
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?