乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 15|回复: 3

[编程交流] Is there a way to determine (b

[复制链接]

59

主题

327

帖子

268

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
295
发表于 2022-7-6 11:34:56 | 显示全部楼层 |阅读模式
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.
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 12:14:39 | 显示全部楼层
Cmdactive maybe?
  1. (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.
回复

使用道具 举报

59

主题

327

帖子

268

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
295
发表于 2022-7-6 12:21:30 | 显示全部楼层
YOu mean like this:
 
 
  1. (if (> (getvar 'CmdActive) 0)     (do first);if True     (do second);if nil)
 
 
Thank you. I will try and post my reaction soon.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 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
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-6 02:25 , Processed in 0.434911 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表