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

handling events from dll

0 REPLIES 0
Reply
Message 1 of 1
inner
171 Views, 0 Replies

handling events from dll

im developing a NET dll working as COM (using usual autocad library, not managed code cos it must work on acad2004)

i have writte code to let user change active document selecting its name from a combobox list

[CODE]
xAcad = GetObject(, "AutoCAD.Application.16")
ThisDrawing = xAcad.ActiveDocument

Dim drawing As AcadDocument
For Each drawing In ThisDrawing.Application.Documents
ComboBoxDibujos.Items.Add(drawing.Name)
Next drawing
ComboBoxDibujos.SelectedText = ThisDrawing.Name
sDocumentoActivo = ThisDrawing.Name
....
Private Sub ButtonCambiarDibujo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCambiarDibujo.Click

ThisDrawing = xAcad.Application.Documents.Item(sDocumentoActivar)
ThisDrawing.Application.Documents.Item(sDocumentoActivar).Activate()
sDocumentoActivo = ThisDrawing.Name
End Sub

Private Sub ComboBoxDibujos_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxDibujos.SelectedIndexChanged
sDocumentoActivar = ComboBoxDibujos.Text
End Sub
[/CODE]

but, lets suppose the user add or close a drawing, so i must catch this event and reset and fill again the combobox items list

how could i do this? anyone have tried?

thanks in advance
0 REPLIES 0

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