- 积分
- 565
- 明经币
- 个
- 注册时间
- 2003-11-29
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
各位大哥,小弟求救:
从论坛中发现一段代码,可以拖动地插入图块,代码如下:
Public Sub BlockInsert(Name As String) Dim pLisp As String Dim obj As VLAX Dim pnt(2) As Double Set obj = New VLAX Set pObj = ThisDrawing.ModelSpace.InsertBlock(pnt, Name, 1, 1, 1, 0) obj.EvalLispExpression "(setq ed (entget (handent " & ToStr(pObj.Handle) & ")))" pLisp = "(while (not (= (caddr " & _ "(setq pTime (grread t) " & _ "pSt (car pTime) " & _ "pnt (cond ((= pSt 3) (List 0 0 -1)) ((= pSt 5) (cadr pTime)) (t (List 0 0 1))))) -1)) " & _ "(setq ed (subst (cons 10 pnt) (assoc 10 ed) ed)) " & _ "(entmod ed) " & _ ") " obj.EvalLispExpression pLisp Set obj = Nothing End Sub
但是,我发现利用grread 函数,不能使用CAD的快速捕捉功能,请问怎么才能使用快速捕捉功能呢? |
|