command doesn't run through a button

Started by xaxo87 · 2016-11-26 00:01 UTC · 3 replies · SMF topic #2459

Hello,please I need your help. :(

In autocad 2016 when I run the following code through a button :

(defun c:btSteep1#OnClicked (/)

(command "_ATTSYNC" "N" "*")

)

I am getting the next error message:

Command: ; error: AutoCAD command rejected: "_ATTSYNC"

I think that the changes between 2014 -2015 can be involved on it, but I can't make it works.

It only works if I run the command by "key request" (c:function ...)

Thanks in advance.
Make sure the "Event Invoke" is set to 1 - Asynchronous for the button
Also take a look at the help-file for the function "command-s", which was introduced in 2015 (IIRC)
Thanks to both of you, the problem consisted on I didn't define correctly the "Event Invoke" as said dwyaneward.

Thanks!