rotate the layout-paperformat with VBA

rotate the layout-paperformat with VBA

Anonymous
Not applicable
373 Views
2 Replies
Message 1 of 3

rotate the layout-paperformat with VBA

Anonymous
Not applicable
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
0 Likes
374 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
ThisDrawing.Regen 0
End if
0 Likes
Message 3 of 3

Anonymous
Not applicable
Many thanks!

Hartmut Callies

___________________________________________________________________

schrieb im Newsbeitrag news:5436519@discussion.autodesk.com...
ThisDrawing.Regen 0
End if
0 Likes