乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 45|回复: 2

同时开着两个AutoCAD时,VB如何处理 @_@!

[复制链接]

20

主题

80

帖子

7

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
160
发表于 2004-11-16 20:27:00 | 显示全部楼层 |阅读模式
If  is running, the GetObject function will retrieve the current AutoCAD Application object. When running multiple sessions of AutoCAD, the GetObject function will return the first instance of AutoCAD in the Windows Running Object Table. See the Microsoft Visual Basic documentation for the Running Object Table (ROT) and the GetObject function (for more information about verifying the session returned by GetObject).
我的问题是如何在running multiple sessions of AutoCAD时得到当前的 AutoCAD
而不是the first instance of AutoCAD in the Windows Running Object Table
还请各位帮忙指点迷津,我先谢谢大家了!!!
我的VB调用AutoCAD 方法如下
Function GetAcadApp()
                         Dim AcadApp As Object '定义一个对象
                         On Error Resume Next
                         Set GetAcadApp = GetObject(, "AutoCAD.Application")
                         If Err Then '如果没有一个AutoCAD副本在运行
                         Err.Clear
                         Set GetAcadApp = CreateObject("AutoCAD.Application")
                         AcadApp.Visable = True '启动一个AutoCAD副本并设为可见
                         If Err Then
                         MsgBox Err.Description '如果失败,给出错误提示
                         Exit Function
                         End If
                         End If
End Function
回复

使用道具 举报

20

主题

80

帖子

7

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
160
发表于 2004-11-17 12:45:00 | 显示全部楼层
没有办法么......
回复

使用道具 举报

17

主题

38

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
106
发表于 2004-11-17 16:25:00 | 显示全部楼层
不明白什么意思
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-16 15:00 , Processed in 4.581624 second(s), 58 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表