Author Topic: how to get model space screen size in pixels?  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

efernal

  • Bull Frog
  • Posts: 206
how to get model space screen size in pixels?
« 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
e.fernal

Spike Wilbury

  • Guest
Re: how to get model space screen size in pixels?
« Reply #1 on: December 23, 2008, 09:57:21 AM »
Here are two functions (forgot the author) might help.-

Code: [Select]
  ;;; 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"))))

efernal

  • Bull Frog
  • Posts: 206
Re: how to get model space screen size in pixels?
« Reply #2 on: December 23, 2008, 10:32:51 AM »
Thanks, Le...
e.fernal
e.fernal