ACAD 2005 - APPLY SETUP TO ALL LAYOUTS
ACAD 2005 - APPLY SETUP TO ALL LAYOUTS
(OP)
I have 13 layouts and a new printer in the office. How can I apply the new layout (relating to the new printer) to all layouts without going from tab to tab. Thanks





RE: ACAD 2005 - APPLY SETUP TO ALL LAYOUTS
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: ACAD 2005 - APPLY SETUP TO ALL LAYOUTS
VBA example to apply same settings to all layouts ... plus plotting...
CODE
Dim Layouts As AcadLayouts, Layout As AcadLayout
Dim oPlot As AcadPlot
Dim AddedLayouts() As String
Dim LayoutList As Variant
Dim oLayout As AcadLayout
Dim ArraySize As Integer, BatchCount As Integer
' Get layouts collection from document object
Set Layouts = ThisDrawing.Layouts
' Get the names of every layout in this drawing
For Each Layout In Layouts
Layout.ConfigName = "my_printer.pc3"
Layout.CanonicalMediaName = "A3"
Layout.PaperUnits = acMillimeters
Layout.PlotHidden = False
Layout.PlotRotation = ac0degrees
Layout.PlotType = acExtents
Layout.PlotViewportBorders = False
Layout.PlotViewportsFirst = True
Layout.PlotWithLineweights = True
Layout.PlotWithPlotStyles = False
Layout.ScaleLineweights = False
Layout.ShowPlotStyles = False
Layout.StandardScale = acScaleToFit
Layout.UseStandardScale = True
Layout.CenterPlot = True
Next
For Each oLayout In ThisDrawing.Layouts
ArraySize = ArraySize + 1
ReDim Preserve AddedLayouts(1 To ArraySize)
AddedLayouts(ArraySize) = oLayout.Name
Next
LayoutList = AddedLayouts
Set oPlot = ThisDrawing.Plot
oPlot.SetLayoutsToPlot LayoutList
oPlot.PlotToDevice
End Sub