没看明白 Public Sub CADConnect() On Error Resume Next Set Obj_Acad = GetObject(, "autocad.application") If Err Then Err.Clear On Error Resume Next Set Obj_Acad = CreateObject("autocad.application") If Err Then Err.Clear MsgBox "不能运行AutoCAD,请检查是否安装!", vbOKCancel, "警告!" Exit Sub End If End If Obj_Acad.Visible = True Set Obj_Doc = Obj_Acad.ActiveDocument Set Obj_ModelSpace = Obj_Doc.ModelSpace Bool = True Block_bool = False End Sub 我这样打开的CAD都是CAD默认的acadiso.dwt 我是想用vb代码启动CAD,在每次启动时都启动我自己做的DWT(比如123.dwt),而不是CAD默认的acadiso.dwt。 能否给我一段代码参考一下。 |