Hallo Viel-Wissende,
obwohl ich schon logisch eine Menge hintereinanderkriege, verzweifle ich hier:
Ich möchte einen Bereich im Modell (als pdf) drucken und habe mir einiges zusammengesucht...
Eine Zeichnung (A4 hochkant) beginnt bei Point1 mit 0,0 und geht bis Point2 mit 210,297. Wenn ich bei ### durch einen Haltepunkt abbreche und dann in AutoCAD>>Datei>>Plot... das Plottenfenster öffne und auf den Botton "Fenster<" gehe, sehe ich, dass der richtig gewählte Bereich nach rechts oben verschoben ist, sodass natürlich nur der linke untere Zipfel gedruckt wird.
Was mache ich nur falsch???
Sub PlotPDF()
Dim point1 As Variant, point2 As Variant
ThisDrawing.ActiveLayout = ThisDrawing.Layouts("Model")
ZoomExtents
ThisDrawing.SetVariable "OSMODE", 53
ThisDrawing.SetVariable "ORTHOMODE", 0
ThisDrawing.ActiveLayout.ConfigName = "PDFCreator"
ThisDrawing.ActiveLayout.CanonicalMediaName = "A4" ''Papierformat A4
ThisDrawing.ActiveLayout.StyleSheet = "acad1.ctb" ''STB oder CTB je nachdem was vorgegeben ist.
ThisDrawing.ActiveLayout.StandardScale = acScaleToFit ''Plotmaßstab
ThisDrawing.ActiveLayout.PlotRotation = 0 ''Plotrotation
ThisDrawing.Plot.NumberOfCopies = 1 ' 1 Kopie drucken
point1 = ThisDrawing.Utility.GetPoint(, "Click the lower-left of the window to plot.") ' Get first point in window
point2 = ThisDrawing.Utility.GetCorner(point1, "Click the upper-right of the window to plot.") ' Get second point in window
ReDim Preserve point1(0 To 1) ' Change this to a 2D array by removing the Z position
ReDim Preserve point2(0 To 1) ' Change this to a 2D array by removing the Z position
ThisDrawing.ActiveLayout.SetWindowToPlot point1, point2 ' Send information about window to current layout
'### HIER ist das Problem bereits!
ThisDrawing.ActiveLayout.GetWindowToPlot point1, point2 ' Read back window information
MsgBox "Press any key to plot the following window:" & vbCrLf & vbCrLf & _
"Lower Left: " & point1(0) & ", " & point1(1) & vbCrLf & _
"Upper Right: " & point2(0) & ", " & point2(1)
ThisDrawing.ActiveLayout.PlotType = acWindow
' ThisDrawing.ModelSpace.Layout.StandardScale = acScaleToFit ' Be sure to plot a view, not some other plot style
ThisDrawing.ActiveLayout.StandardScale = acScaleToFit ' Be sure to plot a view, not some other plot style
'...
End Sub
Danke für Eure Hilfe...,
Stefan
AutoCAD2008 auf XPProfessional
------------------
IV2008
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP