Can't Reset Layout Limits - VBA

Can't Reset Layout Limits - VBA

Anonymous
Not applicable
418 Views
3 Replies
Message 1 of 4

Can't Reset Layout Limits - VBA

Anonymous
Not applicable
I'm having trouble resetting the limits of a layout created in VBA. I know you can't set the limits unless the margins and background are turned off but even when I turn them off...
ACADPref.LayoutDisplayMargins = False
ACADPref.LayoutDisplayPaper = False
and reset them...
NewLimits(0) = -17
NewLimits(1) = -5.01
NewLimits(2) = 896.81
NewLimits(3) = 569.96
ThisDrawing.Limits = NewLimits
the layout remains the wrong size.
0 Likes
419 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor
These are determined by the sheet size of your Layout and the printer driver you are using. In the old days you could do this. I think you can only do that for modelspace limits.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 4

Anonymous
Not applicable
You're right Ed. When I run this code, the model space limits change. I've narrowed it down to changing the current layout configuration name. CurrLayout.ConfigName="FileName.PC3" but now I'm having problems with the units (mm vs. in)!
0 Likes
Message 4 of 4

Anonymous
Not applicable
From the online help for PaperUnits property :

"This property determines the units for the display of the layout or plot
configuration in the user interface. This property does not determine the
units for input or query of the ActiveX Automation properties. All ActiveX
Automation properties are represented in millimeters or radians, regardless
of the units settings."
0 Likes