본문 바로가기
autocad

Get Coordinates for the screen display

by kmlab 2025. 5. 19.

 

 

Size of current view in Model

Hello, I am trying to get the size of current view in Model space but it seems unavailable in System variable settings. There are Screensize, Viewsize, but they don't seem to be helpful.   Thank you  

forums.autodesk.com

 

(defun View:LL-UR ( / h w c)
  (setq h (getvar 'VIEWSIZE))
  (setq w (* 0.5 (* h (apply '/ (getvar 'SCREENSIZE)))))
  (setq h (* 0.5 h))
  (setq c (getvar 'VIEWCTR))
  (list
    (mapcar '- c (list w h))
    (mapcar '+ c (list w h))
  );list
);defun

반응형

'autocad' 카테고리의 다른 글

ENTMAKE *TEXT  (0) 2025.05.20
OSNAP mode  (0) 2025.05.20
Using path with Space Blank in lisp  (2) 2025.05.16
Create Layer by Lisp  (0) 2025.05.09
(startapp "explorer /e, c:\\temp\\")  (0) 2025.05.09