MarcoW 发表于 2022-7-6 11:34:56

Is there a way to determine (b

Hello,
 
Is there a way to determine (by lisp) if a command is in progress?
I want to make a macro that can do either the first thing (if a command is in progress) or or the second thing if there is no command in progress.
 
TNx.

lpseifert 发表于 2022-7-6 12:14:39

Cmdactive maybe?

(if (> (getvar 'CmdActive) 0))   (do first);if True   (do second);if nil)
You'll probably run into problems if you try and execute functions/commands while a command is active.

MarcoW 发表于 2022-7-6 12:21:30

YOu mean like this:
 
 

(if (> (getvar 'CmdActive) 0)   (do first);if True   (do second);if nil)
 
 
Thank you. I will try and post my reaction soon.

Lee Mac 发表于 2022-7-6 12:54:54

CMDACTIVE is actually bit-coded, so you might want to look into such functions as logand/logior.
 
Here is a reference:
 
http://www.autodeskpress.delmar.cengage.com/resources/olcs/system/ACADVariables-Alphabetical.htm#CMDACTIVE
页: [1]
查看完整版本: Is there a way to determine (b