get lispended-event (vb.net)

get lispended-event (vb.net)

jan_tappenbeck
Collaborator Collaborator
893 Views
4 Replies
Message 1 of 5

get lispended-event (vb.net)

jan_tappenbeck
Collaborator
Collaborator

hi !

 

i want to define event when lispended. the Probleme i could not found by my autocomplete.

 

like the object catalog is part of Document.

 

 

lispevent1.png

 

but look my autocomplete

 

lispevent2.png

could someone help ??

 

regards Jan

 

0 Likes
Accepted solutions (1)
894 Views
4 Replies
Replies (4)
Message 2 of 5

norman.yuan
Mentor
Mentor

Document.LispEnded/LispCancelled interface is exposed in Autodesk.AutoCAD.ApplicationServices.Document of accordmgd.dll. As long as you have that DLL referenced, you should have access to it.

 

In C#, to handle this event:

 

var dwg=Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiDocument;

dwg.LispEnded+=myListEndedHandler;

 

in VB.NET

 

Dim dwg = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiDocument

AddHandler dwg.ListEnded, AddressOf myLispEndedHandler 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

jan_tappenbeck
Collaborator
Collaborator

Hi !

 

accordmgd.dll  - are you shure ?

 

i did not found in map2015!

 

i only found accoremgd.dll !

 

this reference is define!

 

regards Jan

0 Likes
Message 4 of 5

_gile
Consultant
Consultant
Accepted solution

Hi,

 

You have to type: AddHandler before: doc.L, so that the intellisense displays the event handlers.

 

LispEnded.png



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 5 of 5

ambrosl
Autodesk
Autodesk

Here is a Help topic that demonstrates how to register and unregister the BeginDocumentClose event which is similar to how you might register the LispEnded event.

http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-F432E285-8B94-4ACD-A186-89E1218DEC07



Lee Ambrosius
Senior Principal Content Experience Designer
For additional help, check out the AutoCAD Developer Documentation
0 Likes