''' <summary>
''' 启动指定版本的CAD
''' </summary>
''' <param name="VerStr"></param>
''' <returns>返回CAD Application ,如果失败,则返回 Nothing</returns>
''' <remarks></remarks>
Public Function StartCAD(Optional ByVal VerStr As String = "") As Object
Try
Dim CadApp As Object = Nothing
If VerStr.Trim = "" Then
CadApp = Microsoft.VisualBasic.CreateObject("Autocad.Application")
Else
CadApp = Microsoft.VisualBasic.CreateObject("Autocad.Application." & VerStr.Trim)
End If
CadApp.Visible = True
CadApp.WindowState = 3
Return CadApp
Catch ex As Exception
Return Nothing
End Try
End Function