M
Mona_Lisa
Hi, excuse my english i know there are not very good, i made a macro for
printing somes drawings.
From now the macro work good except for the choice of paper size and the
plot area.
If i change something in the name of the plotter i receive an error "there
are no printer deveice found" something like that.
But for the paper i don't no why i can't choose the good paper size, the
name are good but when i print some time all work good but in other drawing
the size change for an other size.
For the plot area, if the drawing are save with Display, the macro don't
want to change it to Extents?
Dim Print1 As String 'Variable identifiant le nom de
l'imprimante
Dim Paper1 As String 'Variable identifiant le nom du format de
papier
Dim DWGName As String
Dim activeStatus As String
Dim Drawing As AcadDocument
Print1 = Xerox 6030 Wide Format.pc3 ' The name of my plotter
Paper1 = C-Arch (18"X24") ' The name of the paper size
DWGName = grdPrint.Text
Set Drawing = ThisDrawing.Application.Documents.Item(DWGName)
'Make DWGName active drawing
Drawing.Activate
ThisDrawing.ActiveLayout.ConfigName = Print1
ThisDrawing.ActiveLayout.StyleSheet = "monochrome.ctb"
ThisDrawing.ActiveLayout.CanonicalMediaName = Paper1
ThisDrawing.ActiveLayout.StandardScale = acScaleToFit
ThisDrawing.ActiveLayout.CenterPlot = True
ThisDrawing.ActiveLayout.PlotType = acExtents
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.SetVariable "BACKGROUNDPLOT", 0 ' I think it
is for made the work in background ?
ThisDrawing.Plot.PlotToDevice Print1
ThisDrawing.SetVariable "BACKGROUNDPLOT", 2
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
Thank's
printing somes drawings.
From now the macro work good except for the choice of paper size and the
plot area.
If i change something in the name of the plotter i receive an error "there
are no printer deveice found" something like that.
But for the paper i don't no why i can't choose the good paper size, the
name are good but when i print some time all work good but in other drawing
the size change for an other size.
For the plot area, if the drawing are save with Display, the macro don't
want to change it to Extents?
Dim Print1 As String 'Variable identifiant le nom de
l'imprimante
Dim Paper1 As String 'Variable identifiant le nom du format de
papier
Dim DWGName As String
Dim activeStatus As String
Dim Drawing As AcadDocument
Print1 = Xerox 6030 Wide Format.pc3 ' The name of my plotter
Paper1 = C-Arch (18"X24") ' The name of the paper size
DWGName = grdPrint.Text
Set Drawing = ThisDrawing.Application.Documents.Item(DWGName)
'Make DWGName active drawing
Drawing.Activate
ThisDrawing.ActiveLayout.ConfigName = Print1
ThisDrawing.ActiveLayout.StyleSheet = "monochrome.ctb"
ThisDrawing.ActiveLayout.CanonicalMediaName = Paper1
ThisDrawing.ActiveLayout.StandardScale = acScaleToFit
ThisDrawing.ActiveLayout.CenterPlot = True
ThisDrawing.ActiveLayout.PlotType = acExtents
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.SetVariable "BACKGROUNDPLOT", 0 ' I think it
is for made the work in background ?
ThisDrawing.Plot.PlotToDevice Print1
ThisDrawing.SetVariable "BACKGROUNDPLOT", 2
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
Thank's