我希望实现在1.dwg为活动文档下,由系统创建新文档作为活动文档,并将新文档保存为A.dwg。但结果是1.dwg更名为A.dwg了。
CODE如下:
Dim strTemplatePath As String = "acad.dwt"
Dim acDocMgr As DocumentCollection = Application.DocumentManager
Dim acNewDoc As Document = acDocMgr.Add(strTemplatePath)
Dim acDbNewDoc As Database = acNewDoc.Database
acDocMgr.MdiActiveDocument = acNewDoc
acNewDoc = acDocMgr.MdiActiveDocument
acNewDoc.Database.SaveAs("c:\A.dwg", True, DwgVersion.Current, _
acNewDoc.Database.SecurityParameters)