AutoCAAD2012二次开中出现的奇怪的问题
我的电脑是win7 x64操作系统,安装2012 的64位版本,二次开发是vb.net2010,程序画图都正常,最后编程存盘出现问题。程序代码如下:
Dim sFullFileName As String = "e:\giri\a.dwg"
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Dim db As Database = doc.Database 'Autodesk.AutoCAD.DatabaseServices.HostApplicationServices.WorkingDatabase
Try
Dim strDWGName As String = doc.Name
Dim obj As Object = Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("DWGTITLED")
If System.Convert.ToInt16(obj) = 0 Then
db.SaveAs(sFullFileName, True, DwgVersion.Current, doc.Database.SecurityParameters)
else
db.save()
End If
Return True
Catch ex As Exception
Return False
End Try
执行上述存盘程序后,出现如下提示:
内部错误: !dbobji.cpp@7319 eNot Open For Write
然后AutoCAD2012异常退出。磁盘目录里留下一个sav9620.tmp文件。
请教autocad二次开发高手,这是什么原因造成的?请提供解决方案。谢谢! 没看到有open,你发的代码不全
页:
[1]