Message 1 of 3
rotate the layout-paperformat with VBA

Not applicable
12-27-2006
03:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a layout with a paperformat A2 (420 x 594 mm) without viewports and a
drawing.
I must only rotate the paperformat from upright format to horizontal format
or reverse.
With my VBA-code (AutoCAD 2005) I can not change the format!
The format what I see is unchanged.
But when I open the layoutmanager I can see that the format is changed. And
when I
click OK then also the paperformat changed.
What can I do? Where is the error?
Thanks.
Hartmut Callies
Sub test()
Dim objLayouts As AcadLayouts
Dim objLayout As AcadLayout
Set objLayouts = ThisDrawing.Layouts
For Each objLayout In objLayouts
If objLayout.ModelType = False Then
ThisDrawing.ActiveLayout = objLayout
' objLayout.PlotRotation = ac0degrees
objLayout.PlotRotation = ac90degrees
End If
Next objLayout
End Sub
I have a layout with a paperformat A2 (420 x 594 mm) without viewports and a
drawing.
I must only rotate the paperformat from upright format to horizontal format
or reverse.
With my VBA-code (AutoCAD 2005) I can not change the format!
The format what I see is unchanged.
But when I open the layoutmanager I can see that the format is changed. And
when I
click OK then also the paperformat changed.
What can I do? Where is the error?
Thanks.
Hartmut Callies
Sub test()
Dim objLayouts As AcadLayouts
Dim objLayout As AcadLayout
Set objLayouts = ThisDrawing.Layouts
For Each objLayout In objLayouts
If objLayout.ModelType = False Then
ThisDrawing.ActiveLayout = objLayout
' objLayout.PlotRotation = ac0degrees
objLayout.PlotRotation = ac90degrees
End If
Next objLayout
End Sub