Author Topic: Undefine QNEW Command  (Read 1610 times)

0 Members and 1 Guest are viewing this topic.

djee

  • Newt
  • Posts: 49
Undefine QNEW Command
« on: July 06, 2015, 03:12:25 PM »
I'm new to VB.net... I need to undefine & redefine the QNEW command so that it first load my Form & then proceed to the regular QNEW command... Anyway to achieve this...

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Undefine QNEW Command
« Reply #1 on: July 06, 2015, 05:37:03 PM »
Do not  know vb   but the begin command event should work for you


static void beginCommand(object sender, CommandEventArgs e)
       {
           doc = acadApp.DocumentManager.MdiActiveDocument;
           layerId = doc.Database.Clayer;

           switch (e.GlobalCommandName)
           {
               case "ATTEDIT"

djee

  • Newt
  • Posts: 49
Re: Undefine QNEW Command
« Reply #2 on: July 06, 2015, 08:37:26 PM »
Is there any literature you could refer me too? Should I look into event handler technique?

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: Undefine QNEW Command
« Reply #3 on: July 07, 2015, 07:55:55 AM »
The event is the CommandWillStart event in the Document class.  If you've downloaded the SDK you'll find it in the ObjectArx documentation.
Revit 2019, AMEP 2019 64bit Win 10