Undefine \ Redefine AutoCAD Commands

Undefine \ Redefine AutoCAD Commands

Moshe-A
Mentor Mentor
1,285 Views
4 Replies
Message 1 of 5

Undefine \ Redefine AutoCAD Commands

Moshe-A
Mentor
Mentor

Hi Guys,

 

Many of us here knows that one can undefine\redefine an AutoCAD standard commands but still he it be invoked by using the dot prefix. lately i encounterd some applications that disbales standard AutoCAD commands totally

i mean even trying to invoke it with dot prefix. maybe it's an objectarx \ net application?

 

can someone here elaborate on this, can it be done with VisualLISP\ActiveX?

can a user temporary override this? (if he wants to invoke the native command)

 

thanks in advance

Moshe

0 Likes
1,286 Views
4 Replies
Replies (4)
Message 2 of 5

Norman_Yuan
Mentor
Mentor

@Moshe-A wrote:

Hi Guys,

 

 

... ...

can someone here elaborate on this, can it be done with VisualLISP\ActiveX?

can a user temporary override this? (if he wants to invoke the native command)

... ...


This forum is about AutoCAD .NET API topics. Not sure why you are seeking LISP/ActiveX solution/explanation of how-to here.

 

Anyway, if you use/program with .NET API, you can veto a command in DocumentLockModeChanged event handler based on certain condition, so that the command can appear as if undefined/redefined. However, with AutoCAD COM API/ActiveX you cannot do it.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

Moshe-A
Mentor
Mentor

Norman,

 

thanks for this info

 

can a user temporary override this in order to have the native command?

 

 

0 Likes
Message 4 of 5

Norman_Yuan
Mentor
Mentor

I am not sure I understand your question here: we are talking, in programming forum, about writing code/program to undefine/redefine AutoCAD command. So, when the code/program is loaded and used by user, he/she can only do what your code allows to do, "override" or not, it is up to the programmer's to decide.

 

When doing this with DocumentLockModeChanged event handler, it is likely the code would use the command's name as the criteria of conditions to decide if a newly started command to be vetoed or not. In this case, it does not really matters if the command name is of a native command's or of a custom command (such CommandMethod defined with .NET API).

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 5 of 5

Moshe-A
Mentor
Mentor

Norman,

 

take this senario, a user have objarx/net application (never mind names from known reasons) the application overrides the purge command and behave diffrent from the origin. also the user have some lisp macros that make use of purge command and the lisp fails due to that override.

 

What would you seggest him to do? (he does not allowed to get rid of the application)

 

also think of this:

Autodesk allowes a programer to veto a standard command and the override command does not

works well or even worth, crash the program from time to time and the simple user does not even knows that the issue is with that application, he blaims AutoCAD. and all of this prevent him from doing his job.

 

don't you think Autodesk should add some setting to give the user some control  on this?

 

Moshe


 

 

0 Likes