Public Sub Initialize(ByVal cadApp As Object)
Dim strFileName As String
'根据AutoCAD的版本判断使用的库类型
If Left(cadApp.Version, 2) = "15" Then
Set vl = cadApp.GetInterfaceObject("VL.Application.1")
Else
Set vl = cadApp.GetInterfaceObject("VL.Application.16")
End If
Set VLFS = vl.ActiveDocument.Functions
strFileName = Environ("TEMP") & "\Vertexs.lsp"
Open strFileName For Output As #1
Print #1, UserForm1.TxtLisp.Text
Close #1
VLFS.Item("Load").funcall strFileName
Kill strFileName
End Sub
Set vl = cadApp.GetInterfaceObject("VL.Application.16")
我以前在win7 系统上 就能获取 现在 用win10系统获取不了对象了???怎么回事?
求解?