TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: efernal on December 23, 2008, 07:54:23 AM
-
I can know the screen size (in drawing units) with VIEWCTR system var...
But how to know the model space screen size in pixels, with plain auto lisp?
Is there a way?
This is necessary to calculate the size for export with .bmp format (command EXPORT)
Thanks in advance...
e.fernal
-
Here are two functions (forgot the author) might help.-
;;; Conversion pixel to drawing units
(defun PIX2UNITS (pix)
(* pix (/ (getvar "VIEWSIZE") (cadr (getvar "SCREENSIZE")))))
;;; Conversion drawing units to pixel
(defun UNITS2PIX (units)
(* units (/ (cadr (getvar "SCREENSIZE"))(getvar "VIEWSIZE"))))
-
Thanks, Le...
e.fernal