Author Topic: Command redefined and INPUTSEARCHDELAY variable  (Read 4421 times)

0 Members and 1 Guest are viewing this topic.

Lupo76

  • Bull Frog
  • Posts: 343
Command redefined and INPUTSEARCHDELAY variable
« on: October 04, 2015, 05:01:16 AM »
Hello to all,
I redefined some AutoCAD commands such as. the MOVE (SPOSTA in Italian).

In a normal situation (without third-party applications), pressing "S" followed by Enter, start the SPOSTA command (MOVE in English).
This happens even though the user before pressing Enter waits several seconds.

In my case, having redefined a few commands, it seems that the auto-complete feature gives priority to native AutoCAD commands and not those redefined.
For example, when the user types in the command bar "S" and wait too long before pressing ENTER, it starts the command "SALVAVEL" (QSAVE in English), instead of the command SPOSTA(MOVE in English).
This happens even if the PGP file is set up correctly.

This is very annoying !!  :-(

I found the following solutions, but none of those I like:
1. Set to code the variable INPUTSEARCHDELAY = 600: greatly improves the situation but does not fully resolve, also the code (setvar "INPUTSEARCHDELAY" 600) is not compatible with BricsCAD or with older versions of AutoCAD.

2. Disable from code the autocompletion, however this is not nice to the end user.  :cry:

Do you have any other ideas?
« Last Edit: December 13, 2016, 11:54:29 PM by Lupo76 »

Lupo76

  • Bull Frog
  • Posts: 343
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #1 on: December 13, 2016, 11:56:00 PM »
No suggestions here?
There is a variable to change the native AutoCAD commands priority than the LISP or redefined commands with lisp?

Lupo76

  • Bull Frog
  • Posts: 343
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #2 on: December 14, 2016, 03:27:15 AM »
To simplify the explanation of the problem and allowing you to reproduce it attached a lisp files created for this purpose and a video.

I look forward  :roll:

Randall Culp

  • Newt
  • Posts: 50
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #3 on: December 14, 2016, 08:57:29 AM »
What does function (c:redcommand) do??  It does not appear defined in the posted lisp function.
Randy Culp
(AKA CADaver)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #4 on: December 14, 2016, 09:28:11 AM »
What does function (c:redcommand) do??  It does not appear defined in the posted lisp function.
Probably should be (c:RedefineCommand).

@Lupo76:
This problem seems like another good reason *not* to redefine commands...

Lupo76

  • Bull Frog
  • Posts: 343
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #5 on: December 14, 2016, 10:38:34 AM »
What does function (c:redcommand) do??  It does not appear defined in the posted lisp function.
Probably should be (c:RedefineCommand).

Exact! I am attaching the correct lisp files

@Lupo76:
This problem seems like another good reason *not* to redefine commands...

mmmmm....I can not change the behavior of my application, it would be too complex.
The redefined commands work properly for years.
So I would like to find a solution to this problem.
In other words it would be enough to find a way to force the AutoCAD command bar to also consider the LISP functions as well as the native commands.
BricsCAD already has this behavior! :-)
« Last Edit: December 15, 2016, 04:01:28 AM by Lupo76 »

Randall Culp

  • Newt
  • Posts: 50
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #6 on: December 14, 2016, 05:03:09 PM »
I must be missing something because I really don't see any benefit in the posted function other than it forces select objects prior to moving and prohibits grip moving.  The same can be accomplished by setting PICKFIRST to 0.

If you want native function and some new function, simply name the list function something else.

Im confused  :crazy2:
Randy Culp
(AKA CADaver)

Lupo76

  • Bull Frog
  • Posts: 343
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #7 on: December 15, 2016, 01:48:15 AM »
I must be missing something because I really don't see any benefit in the posted function other than it forces select objects prior to moving and prohibits grip moving.  The same can be accomplished by setting PICKFIRST to 0.

If you want native function and some new function, simply name the list function something else.

Im confused  :crazy2:
The lisp that I put in here is just an example to describe the problem.
The full lisp are at least 200 lines of code ;-)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #8 on: December 15, 2016, 03:33:57 AM »
Does AutoCAD include the aliases in the .pgp file in the 'autocomplete list'?

Lupo76

  • Bull Frog
  • Posts: 343
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #9 on: December 15, 2016, 04:00:47 AM »
Does AutoCAD include the aliases in the .pgp file in the 'autocomplete list'?

PGP file is correct, but I have not found any settings to include or exclude aliases in the 'autocomplete list'.
This setting exists? where?

PS. I think that if you try the lisp that I attached, you have the same problem.... or not?  :-o

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #10 on: December 15, 2016, 06:16:24 AM »
I use BricsCAD so I do not experience this problem. :-D
BricsCAD's autocomplete includes command aliases, hence my suggestion.

Lupo76

  • Bull Frog
  • Posts: 343
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #11 on: December 15, 2016, 08:25:56 AM »
I use BricsCAD so I do not experience this problem. :-D
BricsCAD's autocomplete includes command aliases, hence my suggestion.

I too use BricsCAD, but my application MUST be also compatible with AutoCAD.
No idea on how to solve?  :cry:  :cry:

ChrisCarlson

  • Guest
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #12 on: December 15, 2016, 08:33:09 AM »
Why are you using a lisp routine to accomplish this? "ALIASEDIT" should more than accomplish what you are looking to do

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #13 on: December 15, 2016, 09:34:23 AM »
@Master_Shake: I think you have misunderstood the OP's problem.

ChrisCarlson

  • Guest
Re: Command redefined and INPUTSEARCHDELAY variable
« Reply #14 on: December 15, 2016, 09:57:19 AM »
Call me confused then

Code - Auto/Visual Lisp: [Select]
  1.   (defun c:sposta ()
  2.     (movenew)
  3.   )
  4. (defun movenew ()
  5.   (princ "\n############ Move_RedefinedCommand ############## !!!!!!!!!")
  6.   (setq obj (ssget))
  7.   (command "_.move" obj "" pause pause)
  8. )
  9.