Archi-lab Batch Print Node Problem

I’ve already tried to connect 4 print settings with 4 virews but in that case
all 4 views are printed with the print setting selected by default in print dialog (ctrl+p)

EDIT: Here you can review the definition. The result here is four pdf’s successfully printed, but all with one print setting → the print setting defined in the print dialog not even the first item in the Print Setting list…


Try to add these lines in the Python node inside Print PDF

Thank you, now it works!
There is a little problem, though.
Now If I feed single Print Setting it doesn’t work but it does perfectly with a list of Print Settings, great job!

Yep you are right.
This is an easy fix though:

1 Like

Thank you! That was very handy.

@Petar_Penchev1 Sorry to be pain, could you post the code? Having difficulty getting this to work :confused:

Here is the code - https://drive.google.com/file/d/0B5Srrp8d3ZYCaG9ITVk4SEdMWEE/view?usp=sharing - thanks to @viktor_kuzev

@Petar_Penchev1 Would it have anything to do with dynamo version? I can only use Dynamo 1.0 in work.

I don’t know. I believe the version of dynamo is not a problem. Could you share the error or the problem that you have, so we are able to help you? What is wrong ?

Thanks for quick reply, i have copied your code and getting the following error.

For sure now the Combined Files option is not working.
You should choose “False” for CombinedFiles.
You could combine the files after you print them.

The problem which is reported is the file name. You Should choose something with *pdf extension.
You could use whatever you want, for example - sample.pdf and use not directory path but file path node.

I have switched CombinedFiles to False and replaced directory path with file path and now getting a null error. :slight_smile:

Hmmm, I’m not sure what is the problem now.
Everything should be working now.
Try to change the file path to different directory - sometimes this works
and of course try to restart revit and dynamo.
Otherwise I don’t know that could be the problem.
Be sure you’ve changed the Python Script properly and your inputs are correct.

Did you try setting “RunIt” to false then run and then set it to true and run again?

Nope none of the above worked, still null error. Thanks for all the help though.

I’m also getting the “null” value, both when running with “RunIt” set to “True” and “False”…

After restart of Revit and Dynamo, it produces error in Revit when running with “RunIt” set to “False”. Error is “[Printer Name] cannot be used with [Print Settings]. The print settings will be used”.

The shown [Printer Settings] is correct in this instance, but the [Printer Name] value is not corresponding to the value given in Dynamo.
Don’t know if this helps or adds to the confusion?

Ok, when trying to isolate the problem, it seems that it’s when this piece of code is added, that the “null” error is produced:

TransactionManager.Instance.EnsureInTransaction(doc)
printManager = doc.PrintManager
printSetup = printManager.PrintSetup
if isinstance(printSettings, list):
printSetup.CurrentPrintSetting = printSetting[0]
else:
printSetup.CurrentPrintSetting = printSetting
printManager.Apply()
TransactionManager.Instance.TransactionTaskDone()

Maybe that will help.

Okay, I think I might have further narrowed the problem down.
In my case, I was passing a string array as the data for the “Print Settings” input.
When changing the input type to a value from the “Print Settings” node where I choose a Print Setting.

However, do any of you know if it’s possible to retrieve a list of all available Print Settings?

@Thomas_Pedersen1 this is an old thread and it is already solved. If you have any further queries. You can create a new topic and link this thread as a reference. I will close this topic as the original problem was solved. Thanks :slight_smile: