(vl-load-com)
(defun getboundingbox (ename / lb ur)
(vla-getboundingbox
(vlax-ename->vla-object ename)
'lb
'ur
)
(mapcar 'vlax-safearray->list (list lb ur))
)
;;
(defun move-region-to-wcs-plan (ename / obj z)
(setq obj (vlax-ename->vla-object ename))
(if (and
(= "AcDbRegion" (vla-get-objectname obj))
(/= 0.0 (setq z (caddr (car (getboundingbox ename)))))
)
(vla-move obj
(vlax-3d-point (list 0 0 z))
(vlax-3d-point (list 0 0 0))
)
)
)
;; (move-region-to-wcs-plan(car(entsel)))
;; http://bbs.mjtd.com/thread-93123-1-1.html
(defun correct210 (ent / obj za)
(setq obj (vlax-ename->vla-object ent))
(if (and (vlax-property-available-p obj 'normal t)
(not (equal '(0 0 1)