本帖最后由 作者 于 2007-1-20 12:45:02 编辑
如下语句可调用CAD2004以下版本,怎样才可调用CAD2007, help me ------------------------------------------------------------------------------------------------------------------- Option Explicit Dim DotCAD As AcadApplication Private Sub Command1_Click() Dim L As Double Dim w As Double Dim a As Double Dim b As Double Dim Dmin As Double Dim Dmax As Double L = Me.Text1(0) w = Me.Text1(3) a = Me.Text1(1) Dmin = Me.Text1(2) b = Me.Text1(4) Dmax = Me.Text1(5) Dim returnpnt As Variant AppActivate DotCAD.Caption returnpnt = DotCAD.ActiveDocument.Utility.GetPoint(, "插入点:") ......(程序略过) Private Sub Form_Load() On Error Resume Next Set DotCAD = GetObject(, "AutoCAD.Application") If Err Then Err.Clear Set DotCAD = CreateObject("AutoCAD.Application") If Err Then MsgBox ("please install AutoCAD2004") Unload Me Exit Sub End If End If DotCAD.WindowState = acMax
|