TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: xinxirong on June 05, 2018, 12:27:01 AM

Title: (command-s ^C)cancle activeCMD
Post by: xinxirong on June 05, 2018, 12:27:01 AM
in old version CAD,I can use this code to cancle the command
(command "cmdName" arg1 arg2 ...  ^C)
but in 2014
(command-s ^C)  not success
Title: Re: (command-s ^C)cancle activeCMD
Post by: Crank on June 05, 2018, 02:10:47 AM
I'm surprised that the first option did work.
You can still use COMMAND, how about:
Code: [Select]
(command-s "cmdName" arg1 arg2 ...  (command))/code]
Title: Re: (command-s ^C)cancle activeCMD
Post by: xinxirong on June 05, 2018, 02:37:16 AM
but you know why I use command-s?in repeat,mapcar,while etc Loop program,command will cause error.
Title: Re: (command-s ^C)cancle activeCMD
Post by: roy_043 on June 05, 2018, 03:09:01 AM
Isn't ^C actually a variable that evaluates to nil?
Title: Re: (command-s ^C)cancle activeCMD
Post by: ribarm on June 05, 2018, 04:30:15 AM
I suppose you are using A2015 that has that issue VVC error...
From my testings A2014- and A2016+ don't have problems with (command) inside (mapcar '(lambda ( ... )) ...) (while) and (repeat X) loops...
Title: Re: (command-s ^C)cancle activeCMD
Post by: xinxirong on June 05, 2018, 05:41:48 AM
I get it
(command-s ....)
(vla-SendCommand mydoc "\e");cancle activeCMD