TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: velasquez on June 17, 2011, 04:15:17 PM
-
How to find out if a function AutoLisp this working?
CMDACTIVE does not show it.
Thanks
-
From the help file.
Indicates whether an ordinary command, transparent command, script, or dialog box is active. The setting is stored as a bitcode using the sum of the following values:
1 Ordinary command is active
2 Ordinary command and a transparent command are active
4 Script is active
8 Dialog box is active
16 DDE is active
32 AutoLISP is active (only visible to an ObjectARX-defined command)
64 ObjectARX command is active
Try something like this:
(= (logand (getvar "cmdactive") 32) 32)
or this
(= (logand (getvar "cmdactive") 16) 16)
-
From the help file.
Indicates whether an ordinary command, transparent command, script, or dialog box is active. The setting is stored as a bitcode using the sum of the following values:
1 Ordinary command is active
2 Ordinary command and a transparent command are active
4 Script is active
8 Dialog box is active
16 DDE is active
32 AutoLISP is active (only visible to an ObjectARX-defined command)
64 ObjectARX command is active
Try something like this:
(= (logand (getvar "cmdactive") 32) 32)
or this
(= (logand (getvar "cmdactive") 16) 16)
Thanks Cab,
The AutoLISP function waits for a response but returns CMDACTIVE is 0.
-
Perhaps?
(defun c:test nil
(if *lisp-reactor*
(progn (vlr-remove *lisp-reactor*) (setq *lisp-reactor* nil))
(setq *lisp-reactor* (vlr-lisp-reactor nil '((:vlr-lispwillstart . lispcallback))))
)
(princ)
)
(defun lispcallback ( reactor params )
(princ "\n--> LISP is Running.")
(princ)
)
-
Perhaps?
(defun c:test nil
(if *lisp-reactor*
(progn (vlr-remove *lisp-reactor*) (setq *lisp-reactor* nil))
(setq *lisp-reactor* (vlr-lisp-reactor nil '((:vlr-lispwillstart . lispcallback))))
)
(princ)
)
(defun lispcallback ( reactor params )
(princ "\n--> LISP is Running.")
(princ)
)
Thank you for your code Lee