muck 发表于 2022-7-6 14:55:08

In CAD VBA, Is there a way to

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,

SEANT 发表于 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.
页: [1]
查看完整版本: In CAD VBA, Is there a way to