乐筑天下

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

[编程交流] In CAD VBA, Is there a way to

[复制链接]

170

主题

347

帖子

174

银币

中流砥柱

Rank: 25

铜币
870
发表于 2022-7-6 14:55:08 | 显示全部楼层 |阅读模式
AutoCAD 2006 or above.
 
Is there a way in VBA to test to see if the AutoCAD editor has a drawing
in it? Is there a way to tell if the Acad Editor is empty?
 
If there is more than one drawing in the acad editor how can you see which
one is the last loaded drawing.
 
At this time I need a answer for the first question .
 
Thank you,
回复

使用道具 举报

10

主题

973

帖子

909

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
118
发表于 2022-7-6 16:20:43 | 显示全部楼层
 
The Application.Documents.Count could be queried to see if it's 0.
 
 
There may be other ways but one method could be to use an Application level event. Perhaps an EndOpen Event could log the most recent document in some globally scoped variable.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-4 21:11 , Processed in 0.331889 second(s), 56 queries .

© 2020-2025 乐筑天下

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