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

c# EndLisp event handler

1 REPLY 1
Reply
Message 1 of 2
adsylva
630 Views, 1 Reply

c# EndLisp event handler

 

 

Trying to write an event handler for a lisp routine ending.  This is what I've come up with Based on other event handlers examples;

 

 

 

 

 

[CommandMethod("Test1")]

static

public void Test1() // This method can have any name

{

 .....

Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

doc.LispEnded +=

new ???????(OnLispEnded);

....

 

}

 

private void OnLispEnded(object sender, CommandEventArgs e)

 

{

 

Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

 

Document doc = sender as Document;

 

ed.WriteMessage("...LispEnded = " + e.ToString());

 

}

 

 

 

 

Is this heading in the right direction?  What would ??????? be?

 

Thanks, Andrew 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 REPLY 1
Message 2 of 2
cadMeUp
in reply to: adsylva

something like this:

 

public void Test1()
{
 Document doc = Application.DocumentManager.MdiActiveDocument;
 doc.LispEnded += new System.EventHandler(OnLispEnded);
}

 

private void OnLispEnded(object sender, System.EventArgs e)
{
}

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