马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Lisp函数:,先导入一下
(defun Drag( pBlock / ppnt ed ped)
(defun GetPoint( / a pnt )
(setq a (grread t))
(setq pnt (list 0 0 1))
(if (= 3 (car a)) (setq pnt (list 0 0 -1)))
(if (= 5 (car a)) (setq pnt (cadr a)))
pnt
)
(while (not (= (caddr (setq ppnt (GetPoint))) -1))
(setq ed (entget (handent pBlock)))
(setq ped (list 10 (car ppnt) (cadr ppnt) (caddr ppnt)))
(setq ed (subst ped (assoc 10 ed) ed))
(entmod ed)
)
)
测试(由于拖动在Lisp中做好了,不需频繁调用Vlax类,应该不会使AutoCad崩溃):
Sub Test()
Dim obj As VLAX
Dim c(2) As Double
Dim pObj As AcadBlockRefer