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