http://bbs.csdn.net/topics/390975999
<CommandMethod("OPF", CommandFlags.Session)> _
Public Shared Sub OpenFile()
Dim acDocMgr As DocumentCollection = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
Dim acNewDoc As Document = acDocMgr.Open(filePath, False)
'filepath打开的文件路径,false表示文件可改写
Dim acDbNewDoc As Database = acNewDoc.Database
acDocMgr.MdiActiveDocument = acNewDoc
'将打开的文件设置为当前显示
End Sub
Public Shared Sub OpenFile()
Dim acDocMgr As DocumentCollection = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
Dim acNewDoc As Document = acDocMgr.Open(filePath, False)
'filepath打开的文件路径,false表示文件可改写
Dim acDbNewDoc As Database = acNewDoc.Database
acDocMgr.MdiActiveDocument = acNewDoc
'将打开的文件设置为当前显示
End Sub
[本日志由 tiancao1001 于 2018-05-23 02:16 PM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |