ZoomCenter Method

Back to Methods Reference

Zooms the current viewport to a specified center point and magnification.

Signature

VBA : object.ZoomCenter Center, Magnify

VL : (vla-ZoomCenter object Center Magnify)

(vla-ZoomCenter acadapplic PT1 SC)

  • Object : Application
    The object or objects this method applies to.
  • Center : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates specifying the center of the zoom.
  • Magnify : Double; input-only
    The magnification level of the window. A value smaller than the current value increases the magnification. A larger value decreases the magnification.

Remarks

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

Example :


(defun c:al-zc ()

(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 first point
(setq PT1 (vla-getpoint util nil "\nSpecify center point: "))

;get the magniofication
(setq SC (vla-getreal util "\nEnter magnification or height : "))

;zoom center
(vla-ZoomCenter acadapplic PT1 SC)

(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