Author Topic: Batch Plotting  (Read 3429 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Batch Plotting
« on: February 15, 2007, 11:45:51 AM »
I have many hundreds of drawings to plot for a big project.

All the drawings are varying sizes, from A3 to A0, and none have any page setups, as they aren't our drawings
The files also do no give any idea of the titleblock size.

Is there a way I can plot each one off without having to open each one, go through page setup and then plot it off?
This is killing me, I'll be here for days. :realmad:
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Guest

  • Guest
Re: Batch Plotting
« Reply #1 on: February 15, 2007, 12:00:01 PM »
Use a script and plot to extents??!?

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Batch Plotting
« Reply #2 on: February 15, 2007, 12:02:29 PM »
Paperspace or Modelspace?  If PS and not scaled, you could check minimum and maximum extents, compare to a list of sizes, and plot based on that.  Or, plot everything scale to fit on a single size piece of paper.  Either way could be programmed pretty easily
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

pmvliet

  • Guest
Re: Batch Plotting
« Reply #3 on: February 15, 2007, 12:05:13 PM »
I would spot check maybe 10-20 drawings and see what all your different scenarios are.
Then you could do a script of some sort that meets the majority of the drawings.

If you have the option, plot electronically to DWF or PDF. This will allow you to see your output success without the expense of paper. This also allows you to make adjustments with your script.
You may end up using several plotting scenarios to get it done.

Although, in the end you may end up manually plotting each drawing and find out that was your fastest option.  :-(

Pieter

hudster

  • Gator
  • Posts: 2848
Re: Batch Plotting
« Reply #4 on: February 15, 2007, 12:06:09 PM »
all must be printed at 1:1, scaled to fit won't work. and are in Paper space.

I have a script to plot to extents, but as I don't know the paper sizes, how would I set them?
there is no blocks to read the sheet info from, it's all xref'd in.

What i need is a way to assign the correct pagesetup to each one, then I can use publish to plot all.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

pmvliet

  • Guest
Re: Batch Plotting
« Reply #5 on: February 15, 2007, 12:11:35 PM »
all must be printed at 1:1, scaled to fit won't work. and are in Paper space.

Might be a dumb question, does the paper size need to match the plotted sheet?
Could you take your largest drawing size and plot everything on that size paper.
So a 11"x17" plot will be on a 36"x48" paper?
I know it's a waste, but down and dirty that would work.

Gonna need to get a programmer type (over here guys) that will be able to
search for a lower left point and upper right point, compare it to paper sizes
then assign that to the page setup... That is beyond my capabilities infortunately....

Pieter


hudster

  • Gator
  • Posts: 2848
Re: Batch Plotting
« Reply #6 on: February 15, 2007, 12:15:15 PM »
It's for a presentation, so i need them all to be on the correct sheet sizes.

i'm getting close to smashing my computer here, it's a nightmare having to open each drawing, setup the page, then plot it. oh and I forgot to mention i need to plot to file as well.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

pmvliet

  • Guest
Re: Batch Plotting
« Reply #7 on: February 15, 2007, 12:19:49 PM »
It's for a presentation, so i need them all to be on the correct sheet sizes.

i'm getting close to smashing my computer here, it's a nightmare having to open each drawing, setup the page, then plot it. oh and I forgot to mention i need to plot to file as well.

I feel your pain. Just don't rush it.
Sorry I couldn't help.

Pieter

uncoolperson

  • Guest
Re: Batch Plotting
« Reply #8 on: February 15, 2007, 12:46:22 PM »
okay, here we go... an idea, probably not the greatest... but it's an idea

use one of the thousands of batch lisp routines we have all over the swamp (i saw one yesterday somewhere).

set your pdf writing software to not prompt you for a file name

write a printing routine that prints extents, then using

Code: [Select]
(acet-geom-ss-extents (ssget "x") t) to get the extents of the drawing

alittle math later you have what the sheet size should be
use this and a the pdf filename (should be drawingname.pdf in your default pdf file folder) then use
Code: [Select]
(vl-file-rename old-filename new-filename)

to rename the pdf file to something purposeful like drawingA.pdf ('A' size drawing)

using Adobe compile all the 'A' sized into a big pdf file of just those then print that to A sized paper.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Batch Plotting
« Reply #9 on: February 15, 2007, 01:05:59 PM »
I would create a variable for LL and UR points, measure distance between, run that dist against a list of know sheet size distances, and plot to that size paper.  You said they were all PS, so 1:1 is easy.  What programming languages do you know?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Batch Plotting
« Reply #10 on: February 15, 2007, 01:12:43 PM »
I'm putting something together that might help
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Batch Plotting
« Reply #11 on: February 15, 2007, 01:41:08 PM »
Here is a start to get you going. 
Code: [Select]
Option Explicit
Public Sub AndyBatchPlot()
      Dim currentline As String
      Open "c:\dwgnum.dat" For Input As 1
      While Not EOF(1)
            Line Input #1, currentline
            Documents.Open currentline
            ThisDrawing.Regen acAllViewports
            ZoomExtents
            Dim LL As Variant, UR As Variant
            LL = ThisDrawing.GetVariable("extmin")
            UR = ThisDrawing.GetVariable("extmax")
            Dim dwgdist As Double
            Dim x As Double, y As Double, z As Double
            x = UR(0) - LL(0): y = UR(1) - LL(1)
            x = x ^ 2
            y = y ^ 2

            z = Sqr(x + y)
            Select Case z
                  Case Is <= 40
                        Call SetupAndPlot("11x17Draft.pc3", "STANDARDS.ctb", "Business_Letter_(8.50_x_11.00_Inches)", ac1_1, ac0degrees)
                  Case Is <= 48
                        Call SetupAndPlot("OCE DesignJet 750C.pc3", "VENDOR MEDIUM.ctb", "ARCH_expand_D_(36.00_x_24.00_Inches)", acScaleToFit, ac0degrees)
            End Select

            ThisDrawing.Plot.PlotToDevice
            ThisDrawing.Close (True)
      Wend
      Close 1
End Sub


Private Sub SetupAndPlot(ByRef Plotter As String, CTB As String, SIZE As String, PSCALE As String, ROT As String)
      Dim Layout As AcadLayout
      On Error GoTo Err_Control
      Set Layout = ThisDrawing.ActiveLayout
      Layout.RefreshPlotDeviceInfo
      Layout.ConfigName = Plotter    ' CALL PLOTTER
      Layout.PlotType = acExtents
      Layout.PlotRotation = ROT    ' CALL ROTATION
      Layout.StyleSheet = CTB    ' CALL CTB FILE
      Layout.PlotWithPlotStyles = True
      Layout.PlotViewportBorders = False
      Layout.PlotViewportsFirst = True
      Layout.CanonicalMediaName = SIZE    ' CALL SIZE
      Layout.PaperUnits = acInches
      Layout.StandardScale = PSCALE    'CALL PSCALE
      Layout.ShowPlotStyles = False
      ThisDrawing.Plot.NumberOfCopies = 1

      Layout.CenterPlot = True
      Layout.ScaleLineweights = False
      Layout.RefreshPlotDeviceInfo
      ThisDrawing.Regen acAllViewports
      ZoomExtents
      Set Layout = Nothing
      ThisDrawing.Save
Exit_Here:
      Exit Sub

Err_Control:
      Select Case Err.Number
            Case "-2145320861"
                  MsgBox "Unable to Save Drawing- " & Err.Description
            Case "-2145386493"
                  MsgBox "Drawing is setup for Named Plot Styles." & (Chr(13)) & (Chr(13)) & "Run CONVERTPSTYLES command", vbCritical, "Change Plot Style"
            Case Else
                  MsgBox "Unknown Error " & Err.Number
      End Select
End Sub
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Batch Plotting
« Reply #12 on: February 15, 2007, 01:43:22 PM »
You will need to create a txt file called dwgnum.dat on your c:\  for the routine to open and see the dwgs.  I use DOS to create that really fast.  IF all your dwgs to be printed are in 1 folder or group of subfolders, go to root folder in a CMD Prompt, and type Dir *.dwg /b/s > c:\dwgnum.dat note the spaces.  That will create the file for you to feed this function

Dir_*.dwg_/b/s_>_c:\dwgnum.dat (spaces replaced with _ for clarification)
« Last Edit: February 15, 2007, 01:44:26 PM by CmdrDuh »
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Batch Plotting
« Reply #13 on: February 15, 2007, 01:45:22 PM »
When you say plot to file, are we talking PDF, PLT or DWF or something else?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

hudster

  • Gator
  • Posts: 2848
Re: Batch Plotting
« Reply #14 on: February 16, 2007, 03:24:02 AM »
PLT files.

I've done it now, took me over 3 hours of opening plotting, then plotting again to file then closing.

But I just know this won't be the last time I have to do this.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue