Know when a drawing is made current

Know when a drawing is made current

Anonymous
Not applicable
287 Views
4 Replies
Message 1 of 5

Know when a drawing is made current

Anonymous
Not applicable
Hello all,

What is te best way to get to know when another allready opened drawing is
set current?
Nor the Application object, nor the Document or DocumentCollection object
provides events for this.

thanks in advance,

Ad Brouwer
0 Likes
288 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
AcadDocument_Activate

"Ad Brouwer" wrote in message news:5869323@discussion.autodesk.com...
Hello all,

What is te best way to get to know when another allready opened drawing is
set current?
Nor the Application object, nor the Document or DocumentCollection object
provides events for this.

thanks in advance,

Ad Brouwer
0 Likes
Message 3 of 5

Anonymous
Not applicable
This event won't do the trick, because it only gets triggered for the
document-objects you've declared. It is not possible to declare an array of
documents (private withevents acDocs() as AcadDocument), so i would have to
declare a document-object for every document that could be opened, which
would imply that my application would support a fixed number of open
documents.



"Paul Richardson" wrote in message
news:5869392@discussion.autodesk.com...
AcadDocument_Activate

"Ad Brouwer" wrote in message
news:5869323@discussion.autodesk.com...
Hello all,

What is te best way to get to know when another allready opened drawing is
set current?
Nor the Application object, nor the Document or DocumentCollection object
provides events for this.

thanks in advance,

Ad Brouwer
0 Likes
Message 4 of 5

Anonymous
Not applicable
I didn't realize you were using VB...

You can either create an inprocess server which exposes
ThisDrawing or create a class With a Global AcadDocument
and needed events. You will have to wire this to all open
drawings and watch for any being opened and wire as necessary.
0 Likes
Message 5 of 5

Anonymous
Not applicable
joe sutphin wrote an article about doing this very thing about 8-9 years
ago. perhaps someone in this newsgroup or joe himself might still have it.
unfortunately, i don't seem to have it any longer.


wrote in message news:5869710@discussion.autodesk.com...
I didn't realize you were using VB...

You can either create an inprocess server which exposes
ThisDrawing or create a class With a Global AcadDocument
and needed events. You will have to wire this to all open
drawings and watch for any being opened and wire as necessary.
0 Likes