本帖最后由 作者 于 2006-8-8 8:24:08 编辑
我在使用AutoCAD 2006时总是出现如图所示的错误,请问是什么原因呀?此错误是随机出现的,不过频率比较高,一天10几次!处理不同图也是一样,是不是内存错误(AutoCAD的Bug)?
当我将以上代码注释以后,一天只会出现一两次这样的错误!
private winapi as APIACTIONS.APIAC '此为用VB编写的AxtiveX Dll,在VB中调试并使用无任何问题
Private Sub AcadDocument_BeginLisp(ByVal FirstLine As String) Dim strCmd As String, strReg As String
Set winapi = New APIACTIONS.
If FirstLine Like "(*:*)" And Len(FirstLine) < 20 Then strCmd = Mid(FirstLine, InStr(FirstLine, ":") + 1, InStr(FirstLine, ")") - InStr(FirstLine, ":") - 1) strReg = winapi.RegGetSetting("software\autodesk\", "VLispUsed", strCmd) If strReg = "" Then winapi.RegSetSetting "software\autodesk\", "VLispUsed", strCmd, 1 Else winapi.RegSetSetting "software\autodesk\", "VLispUsed", strCmd, Val(strReg) + 1 End If End If Set winapi = Nothing End Sub
|