明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1712|回复: 0

请教,关于用.net开发问题!(vb.net)

[复制链接]
发表于 2005-1-12 22:16 | 显示全部楼层 |阅读模式
我用的是.net2003和AutoCAD2004,只要添加引用AutoCAD 2004 Type Library吗!? 而在用.net2003和AutoCAD2005里则要添加引用AutoCAD 2005Type Library和两个 dll文件(acmgd.dll和acdbmgd.dll)并加入如下代码: Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD 这样在用到什么函数时非常方便,要命的是AutoCAD2005启动非常慢,运用下面代码不能进入AutoCAD2005(AutoCAD2004可运行): Sub ConcanateAutoCAD()
On Error Resume Next
AcadApp = GetObject(, "AutoCAD.Application")
If Err.Number Then
Err.Clear()
AcadApp = CreateObject("AutoCAD.Application")
If Err.Number Then
MsgBox("不能运行AutoCAD,请检查是否安装了AutoCAD")
Exit Sub
End If
End If
AcadApp.Visible = True '界面可视
AcadApp.WindowState = AutoCAD.AcWindowState.acMax '界面最大化
AppActivate(AcadApp.Caption) '显示AutoCAD界面
End Sub 把“AutoCAD.Application”改为"AutoCAD.Application.16"或“Autodesk.AutoCAD.ApplicationServices.Application”仍不能进autocad2005 1、用.net和AuotCAD2004开发,是不是不如在AutoCAD2005,在添加引用方面是不是少添加了文件!? 2、能否连接AutoCAD2005的代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-27 07:36 , Processed in 0.252924 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表