拖动地插入图,而不能使用CAD的快速捕捉功能,怎么解决?
各位大哥,小弟求救:从论坛中发现一段代码,可以拖动地插入图块,代码如下:
Public Sub BlockInsert(Name As String)<BR> Dim pLisp As String<BR> Dim obj As VLAX<BR> Dim pnt(2) As Double<BR> Set obj = New VLAX<BR> Set pObj = ThisDrawing.ModelSpace.InsertBlock(pnt, Name, 1, 1, 1, 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> Set obj = Nothing<BR>End Sub
但是,我发现利用grread 函数,不能使用CAD的快速捕捉功能,请问怎么才能使用快速捕捉功能呢? 点下去之后可用osnap函数,不过不会显示捕捉框 遇到同样的问题,顶
页:
[1]