[求助]关于“实现模块插入时后的预览和随鼠标移动“的修改
<FONT id=text1 style="FONT-SIZE: 10pt" face="宋体,verdana, arial, helvetica"><BR>Public Sub BlockInsert(Name As String)<BR>'调用VLAX类实现在VBA下编写AutoLisp程序<BR>'从而实现模块插入时后的预览和随鼠标移动<BR><BR>On Error Resume Next<BR>Dim pLisp As String<BR>Dim obj As VLAX<BR>Dim pnt(2) As Double<BR>Set obj = New VLAX<BR>If BlockScale <= 0 Then BlockScale = 1<BR>Set pobj = ThisDrawing.ModelSpace.InsertBlock(pnt, Name, BlockScale, BlockScale, BlockScale, 0)<BR>obj.EvalLispExpression "(setq ed (entget (handent " & ToStr(pobj.Handle) & ")))"<BR>pLisp = "(while (not (= (caddr " & _<BR>"(setq pTime (grread t) " & _<BR>"pSt (car pTime) " & _<BR>"pnt (cond ((= pSt 3) (List 0 0 -1)) ((= pSt 5) (cadr pTime)) (t (List 0 0 1))))) -1)) " & _<BR>"(setq ed (subst (cons 10 pnt) (assoc 10 ed) ed)) " & _<BR>"(entmod ed) " & _<BR>") "<BR>obj.EvalLispExpression pLisp<BR>pobj.Highlight (True)<BR>Set obj = Nothing<BR>End Sub<BR>上代码拷贝与此网站,且运行正常<BR>我想加上右键取消插入,怎么改?<BR>我对Lisp一窍不通所以不会改</FONT> <BR> 为什么没人回答? Vlax不太稳定,建议将程序分成两部分,做块在VBA里,插入块在Lisp里
页:
[1]