ZoomScaled Method

Back to Methods Reference

Zooms the current viewport to given scale factor.

Signature

VBA : object.ZoomScaled Scale, ScaleType

VL : (vla-ZoomScaled object Scale ScaleType)

(vla-ZoomScaled acadapplic SC acZoomScaledRelative)

  • Object : Application
    The object or objects this method applies to.
  • Scale : Double; input-only
    The zoom factor for the zoom.
  • ScaleType : AcZoomScaleType enum, input-only; optional
    acZoomScaledAbsolute
    acZoomScaledRelative
    acZoomScaledRelativePSpace



Remarks

The ScaleType value determines how the scale factor is applied:

Relative to the drawing limits—use acZoomScaledAbsolute
Relative to the current view—use acZoomScaledRelative
Relative to paper space units—use acZoomScaledRelativePSpace

This method applies to the current active viewport (paper space viewport or model space viewport).

Example :



(defun c:al-zs ()

(vl-load-com)

;get reference to the Application Object
(setq acadapplic (vlax-get-acad-object))

;get reference to the Utility object
(setq util (vla-get-utility (vla-get-activedocument acadapplic)))

;get the scale factor
(setq SC (vla-getreal util "\nEnter a scale factor : "))

;zoom Scaled
(vla-ZoomScaled acadapplic SC acZoomScaledRelative)

(princ)

);defun

(princ)
 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website