- Dim AcadVersion As Integer
- With ThisDrawing.Application
- AcadVersion = Val(Left(.Version, 2))
- '根据AutoCAD的版本判断使用的VL库类型
- Select Case AcadVersion
- Case Is = 15
- Set VL = .GetInterfaceObject("VL.Application.1")
- Case Is >= 16
- Set VL = .GetInterfaceObject("VL.Application.16")
- End Select
- End With
-
|