Author Topic: Overkill Command  (Read 16917 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Overkill Command
« Reply #30 on: May 06, 2013, 09:28:59 PM »
Quote
... it is like tits on a bull.
Thanks Tony.
That takes me back about 50+ years to our next door neighbour on the farm.
He was Irish and another of his favourite sayings was 'Take your hurry boy'.

He had 2 daughters, but that's another story altogether.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

TJK44

  • Guest
Re: Overkill Command
« Reply #31 on: May 09, 2013, 03:43:56 PM »
I think I found a workaround that appears to work so I don't have to rebuild my project, although I would really like to incorporate Tony's Extension Method  :-(

Code - Visual Basic: [Select]
  1.                 Dim curAcadDoc As Object = Application.DocumentManager.MdiActiveDocument.AcadDocument
  2.                 curAcadDoc.SendCommand("._-OVERKILL" & vbLf)
  3.                 curAcadDoc.SendCommand("_ALL" & vbLf)
  4.                 curAcadDoc.SendCommand(vbLf)
  5.                 curAcadDoc.SendCommand(vbLf)
  6.  

Edit:
I lied, this still does not execute synchronously. Back to the drawing board.
« Last Edit: May 09, 2013, 03:56:37 PM by TJK44 »

TheMaster

  • Guest
Re: Overkill Command
« Reply #32 on: May 10, 2013, 01:55:45 AM »
I think I found a workaround that appears to work so I don't have to rebuild my project, although I would really like to incorporate Tony's Extension Method  :-(

Code - Visual Basic: [Select]
  1.                 Dim curAcadDoc As Object = Application.DocumentManager.MdiActiveDocument.AcadDocument
  2.                 curAcadDoc.SendCommand("._-OVERKILL" & vbLf)
  3.                 curAcadDoc.SendCommand("_ALL" & vbLf)
  4.                 curAcadDoc.SendCommand(vbLf)
  5.                 curAcadDoc.SendCommand(vbLf)
  6.  

Edit:
I lied, this still does not execute synchronously. Back to the drawing board.

If you're still having problems getting the RunCommand wrapper working, you can also use reflection to call it, without the System.Core.dll problem. 

Here's a post with the reflection-based version:

http://www.theswamp.org/index.php?topic=43113.msg483306#msg483306


TJK44

  • Guest
Re: Overkill Command
« Reply #33 on: May 13, 2013, 02:12:07 PM »
Thanks Tony, that did the trick.