Batch Plotting with Sheet Numbers as PDF File Names

Anonymous

Batch Plotting with Sheet Numbers as PDF File Names

Anonymous
Not applicable

I haven't figured out another way to do this, so hopefully it's possible with the API.  We need to start creating separate PDF files for every sheet in our projects in order to allow the owner, contractor, and design team to utilize certain "PDF linking" capabilities of a construction web-portal. I know that we can batch plot PDFs as individual files, but as far as I know the user still has to press enter to save each file and Revit automatically includes the project and sheet name in the default PDF file name so we'd have to manually edit every file name before saving. Is there a way to use a script routine or does anyone know of an extension that would allow me to have Revit plus Adobe Acrobat or Bluebeam save out individual PDFs of selected sheets and save each one using the sheet numbers? We're talking about several thousands of sheets of documents that will need to be initially created and periodically updated throughout construction.

I've looked into the Batch Plot tool under Add-Ins, but it's pretty useless unless your printing hard copies.

Thanks.

- Alex

0 Likes
Reply
Accepted solutions (2)
32,701 Views
12 Replies
Replies (12)

BlairIsbister
Explorer
Explorer

", and 180 times I have to click "rename" on each and every damned PDF!"

 

I can help with this little bit (just starting revit) a program called "renamer" from den4b will batch rename any file (all 180) with limitless options.

http://www.den4b.com/?x=products&product=renamer

0 Likes

Anonymous
Not applicable

I've looked at many differerent options for this and this is what I've found.

 

With Acrobat you can do multiple plots, if you change the setting to not prompt for file name in the printer settings, the pdf will plot all in one go.  Warning, though I have had the PDF printer crash in the past on heavy/high res plots using this method, it was effectively falling over itself.  The disadvantage of this method is that you would then have to go through each file and rename, although this would be quicker than previous all the pdf's would be there ready.

 

The best method is via the api.  You can write your own or there are some simple plugins out there that will do the job.

 

We're based in the UK and perscribe to the BS1192 file naming standard which is quite lengthy, and contains many different parameters, obviously out of the box this isn't possible with Revit as it will only allow the sheet name and number to be plotted.

 

Our best solution is to use RTV Tools Exporter plugin.  This exports multiple pdf/dwf/dwg using a filename that is completely customisable based on any sheet and project parameters.  For us it does exactly what we want, and it's only $10 which in the grand scheme of things is nothing given the time it'll save.

 

The website is http://www.rtvtools.com/product/rtv-xporter/

 

I don't have any affiliation with these guys by the way, there is also a product by another australian developer called xtransmit, which is a little more involved. I personally prefer the xporter plugin.

 

If you know your api, I think it's relatively easy to do, I don't, but I looked into it and to be honest coding is beyond me (plus I don't have the time).  There's a printer userface api available in the Revit SDK which would be a good starting point I guess.

 

Hope this all helps.

 

Regards,

 

K

 

Hope this helps.

Joe.Ye
Alumni
Alumni
Accepted solution

 

In the Revit SDK, there is a sample, with full code project showing how to print views, sheets via API. 

The sample name is ViewPrinter, located in the samples subfolder.

 

It is a good start point to learn the plot, plot settings API.

And you can change the code to meet your need.

 



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes

Dale.Bartlett
Collaborator
Collaborator

The ViewPrinter sample notes that:

'Autodesk.Revit.DB.Document.PrintSettings' is obsolete:
"This property is obsolete in Revit 2013.
Call GetPrintSettingIds() instead."

Can anyone help with a sample to correct this for 2013? Regards, Dale




______________
Yes, I'm Satoshi.
0 Likes

Dale.Bartlett
Collaborator
Collaborator
Accepted solution

fixed:

<code>

// DJB obsolete 2013// foreach (Element printSetting in m_commandData.Application.ActiveUIDocument.Document.PrintSettings)
foreach(ElementId printSettingId inm_commandData.Application.ActiveUIDocument.Document.GetPrintSettingIds())
{
// DJB cont.
ElementprintSetting = m_commandData.Application.ActiveUIDocument.Document.GetElement(printSettingId);
names.Add(printSetting.Name);

<code>

The code however does not appear to hold <In Session> selections. The list is cleared unless saved twice. Nevertheless it is an excellent example and very helpful. Dale




______________
Yes, I'm Satoshi.
0 Likes

Joe.Ye
Alumni
Alumni

 

I can also confirm that GetPrintSettingIds() method cannot retrieve the In-Session print setting, neither do the Document.PrintSettings property.



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes

Anonymous
Not applicable

Is there a tutorial somewhere to make this work? What is the SDK? what is an API? Why do I need to be a programmer to leverage a few simple (and pretty standard) parameters to set a file name when I pdf?

Anonymous
Not applicable

"Is there a tutorial somewhere to make this work? What is the SDK? what is an API? Why do I need to be a programmer to leverage a few simple (and pretty standard) parameters to set a file name when I pdf?"

 

 

i couldn't agree more. Smiley Indifferent

Anonymous
Not applicable

This problem should not be marked as solved, since there is no solution for it using Revit alone.

Using a script is not a solution, just a workaround. 

DavidWoodCT
Enthusiast
Enthusiast

The Original Poster (Alex) marked the topic as solved because they got their question answered. I guess they were OK with an API solution because this is the Revit API Forum.

 

I agree with you that PDF batch-printing should be built-in to Revit. The idea's probably already in the Revit Ideas forum, so we could add our support there. There's a built-in PDF printer idea here: https://forums.autodesk.com/t5/revit-ideas/2d-pdf-printing-support/idi-p/6325091

 

If you want a solution that works right now, Kevin Fielding mentioned a couple of add-ins that provide batch-print to PDF, in post #3 above: https://forums.autodesk.com/t5/revit-api-forum/batch-plotting-with-sheet-numbers-as-pdf-file-names/m...

 

 

0 Likes

Anonymous
Not applicable

Ok, I understand...

Still, it is kinda disappointing to see how much time it takes for something to get implemented, especially because this issue is a very common one.

Anonymous
Not applicable

3 and a half years later and we still can't do these basic tasks without tedious workarounds.