<CommandMethod("NewDrawing", CommandFlags.Session)> _
Public Sub NewDrawing()
'' 指定要使用的模板文件,如果模板不存在,就使用默认设置 Specify the template to use, if the template is not found
'' the default settings are used.
Dim strTemplatePath As String = "acad.dwt"
Dim acDocMgr As DocumentCollection = Application.DocumentManager
Dim acDoc As Document = acDocMgr.Add(strTemplatePath)
acDocMgr.MdiActiveDocument = acDoc
End Sub
就是这个手册例子,运行这个简单的函数都出现了AcMgd.dll(好像是这个)异常