- (defun MJ:pngout (/ ss s)
- (defun MJ:enbox (en)
- (vla-getboundingbox (vlax-ename->vla-object en) 'll 'ur)
- (mapcar 'vlax-safearray->list (list ll ur))
- )
- (defun MJ:SS2en (ss)
- (vl-remove-if-not
- '(lambda (x) (= (type x) 'ename))
- (apply 'append (ssnamex ss))
- )
- )
- (defun MJ:Extents (plist)
- (list (apply 'mapcar (cons 'min plist))
- (apply 'mapcar (cons 'max plist))
- )
- )
- (defun MJ:SSbox (ss / extents ss2en enbox)
- (MJ:extents
- (apply 'append (mapcar 'MJ:enbox (MJ:ss2en ss)))
- )
- )
- (vl-load-com)
- (vl-cmdf "_zoom"
- (car (setq s (MJ:ssbox (setq ss (ssget)))))
- (cadr s)
- )
- (if (>= (atoi (getvar "acadver")) 20)
- (command-s "_.pngout" "d:\\1.png" ss "")
- (vl-cmdf "_.pngout" "d:\\1.png" ss "")
- )
- (princ)
- )
|