.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Event to switch document

1 REPLY 1
Reply
Message 1 of 2
jithin.dcs
267 Views, 1 Reply

Event to switch document

I want to perform DocumentBecameCurrent event when initilise the dll.
I Implimentd the code like bellow but its not fired.

public void Initialize()
{
Autodesk.AutoCAD.ApplicationServices.DocumentCollection docCollect=null;
docCollect.DocumentBecameCurrent += new DocumentCollectionEventHandler(DocumentCurrent);
}

private static void DocumentCurrent(object sender, DocumentCollectionEventArgs e)
{
MessageBox.Show("Document activated.");
}

I need support to perform the same . waiting for replay.
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: jithin.dcs

Call the event handler from Initialize().
Note that you 'll have to assign appropriate values to the parameters of the
DocumentCurrent function yourself.
At least, that's how I do this.

Hope this helps & is correct.


wrote in message news:6342109@discussion.autodesk.com...
I want to perform DocumentBecameCurrent event when initilise the dll.
I Implimentd the code like bellow but its not fired.

public void Initialize()
{
Autodesk.AutoCAD.ApplicationServices.DocumentCollection docCollect=null;
docCollect.DocumentBecameCurrent += new
DocumentCollectionEventHandler(DocumentCurrent);
}

private static void DocumentCurrent(object sender,
DocumentCollectionEventArgs e)
{
MessageBox.Show("Document activated.");
}

I need support to perform the same . waiting for replay.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost