Hello,
I wrote lisp that [S] Button is "_SPLINE":
(DEFUN C:S () (COMMAND "_SPLINE"))
I noticed, that when I use original SPLINE, ENter,
there are 3 options to choose: [Method/Knots/Object].
And when I type S, Enter,
there is only 1 option: [Object].
Here is part of CommandLine:
-------------------------------------------------
Command: SPLINE
Current settings: Method=Fit Knots=Uniform
Specify first point or [Method/Knots/Object]: *Cancel*
Command: S nil
Specify first point or [Object]: *Cancel*
-------------------------------------------------
Could you please tell me, why it is so?
What I did wrong in this lisp?
Where is the difference from?
I want, that when I type S, Enter, there will be 3 options.
I'm not sure, but two quick suggestions:
A. In case anything in your system or specific program may have redefined the Spline command, try using the period prefix in the command name:
(DEFUN C:S () (COMMAND "_.SPLINE"))
B. Rather than define it as a command name, go into the ACAD.PGP file and change the command alias S, which [in English AutoCAD, anyway] calls up Stretch, to call up Spline instead.
I'm not sure why it is hiding the options in the lisp call.
But SPLKNOTS and SPLMETHOD setvars control that both options. So, you can set these setvar's as per your requirement and call the spline command.
As Kent mentioned, already 'SPL' shortcut is given in the acad pgp file.
Regards,
gsktry
Ignore my previous reply. As Henry mentioned in one of his previous post, (initcommandversion) does the trick here.
try this: (defun C:S () (initcommandversion) (command "spline"))
Regards,
gsktry
I noticed that there are few commands which need '(INITCOMMAND)' to work good.
They are for example: JOIN, SPLINE, ARRAY.
(When you type JOIN, Enter, sometimes there is prompt "Select source object: " and after you choose this one, there is second one: "Choose objects to join ".
But sometimes there is second version of JOIN, which prompts "Select source object or multiple objects to join at once: ".
ow it is? In both situation you type JOIN, Enter, and you get other prompts? What depends it on?)
On ground of Kent1Cooper's post on
"try it with the period/decimal-point prefix to force it to use the native command definition:
(command "_.rotate")"
I noticed, that typing 'dot' before command is the second good way to make them working properly.
Do you know other commands which could send you wrong prompt even if you type it good?