command doesn't run through a button

Started by xaxo87, November 25, 2016, 04:01:27 PM

Previous topic - Next topic

xaxo87

Hello,please I need your help. :(

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

Code (autolisp) Select
(defun c:btSteep1#OnClicked (/)

[b](command "_ATTSYNC" "N" "*")[/b]

)


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.

dwyaneward

Make sure the "Event Invoke" is set to 1 - Asynchronous for the button

Peter2

Also take a look at the help-file for the function "command-s", which was introduced in 2015 (IIRC)
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

xaxo87

Thanks to both of you, the problem consisted on I didn't define correctly the "Event Invoke" as said dwyaneward.

Thanks!