本帖最后由 作者 于 2010-1-13 16:42:54 编辑
转帖: From: Luis Esquivel <nospam@address.withheld> Subject: Re: Moving without rubber band line. Newsgroups: autodesk.autocad.customization ..... Here is one I did.... to move blocks. ;;; ability to drag an move a vla object [block] ;;; msg: optional message by default uses "Move" (defun drag_move (msg obj / take code5 p3) (prompt (strcat "\n" (cond (msg) ("Move") ) "\n" ) ) (while (and (setq take (grread 't)) (/= 3 (car take))) (setq code5 (car take)) (setq p3 (cadr take)) (if (and p3 (= 5 code5)) (vla-move obj (vla-get-insertionpoint obj) (vlax-3d-point p3) ) ) ) ) (defun C:TST (/ ent obj) (setq ent (car (entsel))) (setq obj (vlax-ename->vla-object ent)) (drag_move nil obj)) |