Message 1 of 5

Not applicable
09-02-2018
02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am stuck with this. My goal is to resize all viewports with the same center. You set length and width and the work will be automatic...
I do not know how to code the assignment of the length and width to each viewport.
Although, i am thinking if it would be easier to copy the size of the selected viewport to all.
any suggestion?
(Defun c:1 ( / factor1 factor2 vps) (initget 1) (setq factor1 (getreal "\nEnter length: ")) (setq factor2 (getreal "\nEnter width: ")) (setq vps (ssget "_X" '((0 . "Viewport") (-4 . "/=") (69 . 1)))) (repeat (sslength vps) (setq e (vlax-ename->vla-object (ssname vps 0))) (setq cscale (vla-get-CustomScale e)) (vlax-invoke e (vlax-get e 'Center) factor1) (vlax-invoke e (vlax-get e 'Center) factor2) (vla-put-CustomScale e cscale) (ssdel (ssname vps 0) vps) ) (princ) )
Solved! Go to Solution.