<span ></span>
<span >Option Explicit</span>
Public acadapp As AcadApplicationPublic Sub 连接autocad()On Error Resume NextSet acadapp = Getobject(,"autocad.applicatior")If Err Then Err.Clear Set acadapp = creatobject("autocad.application") If Err Then MsgBox ("不能运行autoCad,请检查是否装了autoCad") Exit Sub End IfEnd Ifacadapp.Visible = TrueEnd Sub
方法2:
Dim acadapp As AcadApplication '在窗体代码声明段定义acadappPrivate Sub Form_Load()On Error Resume NextSet acadapp = Getobject(,"autocad.application")If Err Then Err.Clear Set acadapp = CreateObject("autocad.application") If Err Then MsgBox ("不能运行autoCad,请检查是否安装了CAD") Exit Sub End IfEnd Ifacadapp.Visible = TrueEnd Sub总结
以上是内存溢出为你收集整理的VB 连接AutoCad 模块代码全部内容,希望文章能够帮你解决VB 连接AutoCad 模块代码所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)