Hi,
Yeah, i commented out the CanonicalMediaName line and it worked, but it printed it portrait on a landscape page. Then, I changed the PlotRotation line to 1, not Ac90Degrees and kept the CanonicalMediaName line in and it did the same - portrait on a landscape page..
Below is a small routine i did to check the modelspace plot settings of drawings and after running it, the CanonicalMediaName showed as A4 and the PlotRotation line showed as 1..
' Get the current plot settings for the drawing..
Sub GetPlotSettings()
Dim PlotTypeX As String
PlotTypeX = ThisDrawing.ModelSpace.Layout.PlotType
MsgBox _
"The Plotter for the active layout is: " & ThisDrawing.ModelSpace.Layout.ConfigName & vbCr & _
"The PlotStyle for the active layout is: " & ThisDrawing.ModelSpace.Layout.StyleSheet & vbCr & _
"The Media (paper size) for the active layout is: " & ThisDrawing.ModelSpace.Layout.CanonicalMediaName & vbCr & _
vbCr & _
"The Scale for the active layout is: " & ThisDrawing.ModelSpace.Layout.StandardScale & vbCr & _
"The Units for the active layout is: " & ThisDrawing.ModelSpace.Layout.PaperUnits & vbCr & _
"The Plot Type for the active layout is: " & PlotTypeX & vbCr & _
"The Plot Rotation for the active layout is: " & ThisDrawing.ModelSpace.Layout.PlotRotation _
, vbInformation, "Get Plot Settings: " & ThisDrawing.Name
End Sub
So, thanks for the reply and at least it didn't crash out this time, just need to sort out the orientation now..
Any ideas?
Cheers,
Paul
basepointdesignzltd..
P4 3.0Ghz / 2GB RAM..
XP Pro SP2..
Sapphire X1950 512MB Dual-DVi Graphics Card..
AutoCAD 2008..