Skip to content Skip to sidebar Skip to footer

Why Do Pdfs Take So Long to Print Reading

Some time agone I accept spotted this post by Sol Armor at DynamoBIM forum, request nigh press PDFs out of Dynamo and I was a little sad that we didn't already have whatever tools for that. Recently (concluding Friday) I was besides asked by my PA to impress some stuff for him, and I was reminded just how limited electric current printing tools in Revit are. It's not like I needed whatever more than reasons to await at this issue, but also on Friday a colleague of mine told me they are "issuing a set" and are currently in a process of re-naming of hundreds of PDFs that were printed out of Revit. Why? Because per client wish/requirement they were obliged to name each PDF certificate with a Sail Revision in its proper name…duh! Since every sail was in a unlike revision land, nosotros had a piddling pickle on our easily that couldn't be solved without custom plug-in or x-amount of man hours. This is what I came up with in Dynamo instead:

Then first thing that bothered me when I was printing, was that I couldn't quickly impress sheets that I needed at the moment and creating new sets every fourth dimension I wanted to print merely a new sheet was added to the gear up and I had to go back and edit the set that I created in a commencement place. It'south like my "100% CD" view prepare is good today, but tomorrow it sucks. So I though it would be fashion easier to use Dynamo to dynamically filter for sheets that I wanted, by any parameter – similar Sheet Outcome Engagement. So instead of relying on View Sets I tin now dynamically create lists of sheets that I desire to print.

Of course view sets are however a viable method of defining what sheets we want to impress so I am still supporting that method. As a thing of time here'southward how:

image01

This way I can apply both means of defining what sheets I want to print just the final input into the Print PDF node will have to be a list of Canvass View Elements. Speaking of Impress PDF node, here's how it is set upwards:

printPDF

Here's the code for it:
  We already covered Views, and so let'south wait at Print Range. In order to apply a listing of views we have to set Impress Range to Select. This aligns with the procedure that you would use while working in the UI. image03 I haven't really tested other options like Current and Visible, only if someone gives them a endeavor and they fail, let me know how they failed and i volition attempt to fix it. Next thing up is a Combined File boolean input. If you set to to True the printout will exist a single file, while if set to False you volition impress each sheet separately. At present, here's an Adobe tip: Since I hate being prompted for a file name for every sheet, I guess others too, yous can go to Start>Devices and Printers then Right Click on Adobe PDF (that's the printer that I am using) to set Printer Preferences. Here'southward what I set mine to: image04 Unchecking "View Adobe PDF Results" will make sure that Adobe doesn't open up the newly printed file. It should speed things upward a flake. Too, unchecking "Enquire to replace existing PDF file" will supress any warnings caused past already existing files in the destination folder and they will exist overridden by default. Last scrap is to prepare the "Adobe PDF Output Folder", which is a folder that all PDFs will be printed regardless of your electric current destination folder setting in Revit. Since these settings take precedent over in Revit settings, get used to seeing all of your prints always become dropped to this folder. Information technology's not the finish of the day, and sure every bit hell is a decent time saver for me when plotting multiple sheets to a single PDF each. Next is a Printer Name. For this practice I was using a Adobe PDF printer, just I guess some people adopt to utilize Bluebeam PDF or PDF995 printers as well. I haven't tested information technology with whatever other printer, but again, feel free to give it a whirl and let me know how information technology went. To obtain names of all locally installed printers I use a node chosen Local Printers Names which wouldn't exist possible without corking help from Stack Overflow community. I am in all honesty albeit that this kind of utilise of ctypes library is non in my tool belt. Anyhow, I got some assistance on this ane and its pretty astonishing: image05 Next upwardly are Print Settings. For now I was happy to merely apply i of the pre-divers user Print Settings, simply in the future I volition brand a node where user can define its own settings. I guess ability to define your own settings will come super helpful when plotting PDFs to multiple canvas sizes. We could easily automate print setting consignment based on canvass size and make this tool fifty-fifty meliorate. For now just pre-make ane and use this node to select it: Edit 2015/08/08 : Print Settings now accepts a unmarried item and/or a list. What that ways is you can plot (100) sheets and for each one you can ascertain (100) different print settings. Of course this is merely one footstep closer to what I was discussing in a higher place where the intent is to be able to plot different sheet sizes in ane run. Now, you can. Only supply a Print Setting name for each sheet and they will all exist plotted to that setting. And so if we have a setting for each canvas size, then nosotros tin pair up sheets with proper print settings and problem solved. We no longer have to run multiple plots because we take multiple sheet size that get issued. Below are two examples for each instance: Untitled-1 Next input is a File Path. This is a weird input. You call up that few lines up I said that when nosotros specify a Default Output Binder in Adobe PDF Printing Preferences, then information technology will override this setting. Yeah, information technology will, but Revit API is still expecting you to set it to something, or you can expect an error. Hence, I am making information technology an input and y'all can fix it to some random file proper name but make sure that information technology ends with a *.pdf format. image06 The final input is a Boolean toggle to make the script execute. I have started to put boolean toggles on most of my nodes, because I don't want this node to print (it might accept a while with a large gear up of sheets) every time I hit F5. Ok, at this moment we should have printed our drawing gear up and bold they were individual sheets, they will all exist named with the standard Revit naming convention: FileName – UserName – Canvas – SheetNumber – SheetName.pdf Of course this non the proper name that I want. If I am but interested in removing all of the stuff before Sheet Number and Name, then I am normally using a tool like Bulk Rename Utility. However, if my goal is to rename each canvass with a more customized name that for instance would include a current Sheet Revision Number, then I tin utilize some other tool that I take developed for this workflow: image07 Here's code that I used to create this node:

Rename Files is a node that will accept a Directory Path input. It will then look for all files contained in that directory and rename but those files that in their total name have an "identifier". An identifier is a string that is unique to that detail file name. In instance of our sheets its usually a Canvas Number value. Since, Revit by default puts a Sheet Number into file name, then we tin can use that as an identifier to isolate and rename only sheets that incorporate our identifier.

I tin obtain an identifier by extracting a Sail Number value from each view that I extracted from a View Fix:

image08

This brings us to another custom node added to archi-lab parcel: Become Congenital In Parameter. This is especially useful when you are extracting Sail Proper noun and Number parameters, considering since there exists multiple parameters in Revit API with the same proper noun, the standard GetParameterByName node fails miserably to obtain the right one and often returns empty or zero values. With this node you lot can get the BuiltIn SHEET_NUMBER or SHEET_NAME parameters and since its an unique name, and so you can rest assured that you are getting the correct value. Also, ParameterNames input tin can either be a list or a unmarried string and volition either return a list or a nested listing.

Back to our Rename File node. Hither we are getting a Sheet Number and since that'southward a unique role of each file's proper name we tin can utilise that to identify but files that we want to rename. Next input is a NewNames input. This has to be a matching length list of strings that we want to rename our files to with a proper *.pdf suffix (I usually accept known file extensions turned on in my windows settings and then I am required to add this to my file proper name).

image09

Ha! This is pretty sweetness method to construct a new file name from random strings, and combination of sheet specific parameters. Now, this is pretty much the reason why I did this whole printing practise in Dynamo, considering I knew that I tin create custom/sheet specific file names. Awesome!

String From Listing is a new archi-lab node that just joins all list items into a single string with a separator then adds a suffix at the end (.pdf).

One time this is consummate, we set up the Boolean toggle to True for the Rename Files node, and watch our files go renamed. Pretty awesome stuff if you ask me.

image10

10.01.2015 Update 1:

I did make some changes to my packet recently. One chief alter was replacing all Enum based nodes with Dynamo UI nodes and proper drop-downs. Now, I did make a pocket-sized mistake with those that resulted with some cleaved functionality. Information technology has only been stock-still. Apologies to all users that were posting comments below. Please download latest archi-lab_Grimshaw bundle. Thank you.

Back up archi-lab on Patreon!

cernyusbarce.blogspot.com

Source: https://archi-lab.net/printing-pdfs-w-dynamo/

Postar um comentário for "Why Do Pdfs Take So Long to Print Reading"