Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACAD 2005 - APPLY SETUP TO ALL LAYOUTS 1

Status
Not open for further replies.

SeanSweeney

Civil/Environmental
Mar 16, 2005
173
0
0
NO
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
 
Replies continue below

Recommended for you

HI, hope this will help:

VBA example to apply same settings to all layouts ... plus plotting...

Code:
Private Sub force_config_to_all_layouts_then_plot()

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
 
Status
Not open for further replies.
Back
Top