Scale a View
 
 
 

If you need to increase or decrease the magnification of the image by a precise scale, you can specify a zoom scale in three ways:

To scale a view, use the ZoomScaled method. This method takes two parameters as input: the scale and the type of scale. The scale is simply a number. How that number gets interpreted by AutoCAD depends on the type of scale you choose.

The type of scale determines if the scale value is created relative to the drawing limits, the current view, or the paper space units. To scale relative to the drawing limits, use the constant acZoomScaledAbsolute. To scale the view relative to the current view, use the constant acZoomScaledRelative. To scale relative to paper space units, use the constant acZoomScaledRelativePSpace.

Zoom in on the active drawing using a specified scale

Sub Ch3_ZoomScaled()
	MsgBox "Perform a ZoomScaled using:" & vbCrLf & _
		 "Scale Type: acZoomScaledRelative" & vbCrLf & _
		 "Scale Factor: 2", , "ZoomScaled"


	Dim scalefactor As Double
	Dim scaletype As Integer


	scalefactor = 2
	scaletype = acZoomScaledRelative


	ThisDrawing.Application.ZoomScaled scalefactor, scaletype
End Sub