OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: xaxo87 on November 25, 2016, 04:01:27 PM

Title: command doesn't run through a button
Post by: xaxo87 on November 25, 2016, 04:01:27 PM
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.
Title: Re: command doesn't run through a button
Post by: dwyaneward on November 25, 2016, 05:30:26 PM
Make sure the "Event Invoke" is set to 1 - Asynchronous for the button
Title: Re: command doesn't run through a button
Post by: Peter2 on November 28, 2016, 03:08:48 AM
Also take a look at the help-file for the function "command-s", which was introduced in 2015 (IIRC)
Title: Re: command doesn't run through a button
Post by: xaxo87 on November 30, 2016, 04:16:32 AM
Thanks to both of you, the problem consisted on I didn't define correctly the "Event Invoke" as said dwyaneward.

Thanks!