Author Topic: BeginDoubleClick Event Handler  (Read 1503 times)

0 Members and 1 Guest are viewing this topic.

BRad

  • Guest
BeginDoubleClick Event Handler
« on: December 06, 2012, 05:31:24 PM »
I have sucessfully implemented functionality which extends the event handlers for various actions, but have come to screeching halt on the following scenario:
Extend doubleclick handler at document load to persistently run an entity filtering mechanism
Test double-clicked entity, filtering by entity type and XData name and values
If specific filter passes muster, route entity to a specific custom command
If entity passes through, simply revert to AutoCADs native doubleclick handler (or do nothing, depending on state of DBLCLKEDIT)

We have been doing this using VBA to trap the pickfirst entity, custom filter and route, or drop back to using the appropriate SendCommand:
...

ElseIf TypeOf entity Is AcadTable Then
  ThisDrawing.SendCommand "_.TABLEDIT  "
ElseIf TypeOf entity Is AcadPViewport Then
  ThisDrawing.SendCommand "_.VPMAX "
ElseIf TypeOf entity Is AcadOle Then
 ThisDrawing.SendCommand "_.OLEOPEN "

...etc, testing for everything, yikes.

As we migrate more of our commands away from VBA (yay!) and build more fresh .NET widgets, we would really like to maintain this ease of editing our quasi-custom entities.
Additionally, the VBA code occasionally blows up when switching drawings in a 64-bit environment, but I haven't had time to dig deeper on that one.

Clues, direction?  Thanks


Jeff H

  • Needs a day job
  • Posts: 6151
Re: BeginDoubleClick Event Handler
« Reply #1 on: December 06, 2012, 06:43:20 PM »
I do not think it matters what DBLCLKEDIT is set to if in the BeginDoubleClick event you kill the selection set and will not use any of AutoCAD's default actions
 
Look at DoubleClickAction http://adndevblog.typepad.com/autocad/2012/09/displaying-entity-details-on-double-click.html