明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 1291500406

[源码] bbalert 16种提示模式

[复制链接]
发表于 2019-4-12 13:36 | 显示全部楼层
nSecondsToWait 问下这个参数是什么  刚才试了下试不出来
发表于 2019-4-12 13:51 | 显示全部楼层
找到了
  nSecondsToWait '等待选择的秒数。若选择超时,消息框自动关闭,返回值 -1
               '缺省值 0 秒,必须选择一个按钮,消息框才会关闭
好像在lisp里这个没有用

http://www.bathome.net/thread-19604-1-1.html
发表于 2019-4-12 14:30 | 显示全部楼层

命令: bb1 ; 错误: no function definition: VLAX-GET-ACAD-OBJECT
 楼主| 发表于 2019-4-12 14:44 | 显示全部楼层
本帖最后由 1291500406 于 2019-4-13 15:38 编辑
刘仁钊 发表于 2019-4-12 14:30
命令: bb1 ; 错误: no function definition: VLAX-GET-ACAD-OBJECT
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=90879&highlight=vlax-get-acad-object
试试加
(vl-load-com)



发表于 2019-4-14 09:43 | 显示全部楼层
加载了(vl-load-com)成功了,谢谢!!
发表于 2019-6-22 16:19 | 显示全部楼层
流弊啊,这种调用的代码就不会写
发表于 2019-12-28 17:36 | 显示全部楼层
本帖最后由 Kye 于 2019-12-28 17:42 编辑

弹出消息框之前,需要点击任务栏中出现的按钮,这等于点击了两次,有什么办法少点击一次
发表于 2020-5-19 17:33 | 显示全部楼层
(setq atr (bbalert  (strcat "即将统一标注样式,请确认出图比例设置是否与图纸图框比例匹配。匹配点确定,否则点取消后先正确设置出图比例再统一!!" )  2 "提示:" 1))
(princ atr)
(if (= atr  2)(exit))

经测试,没有取到返回值,这个判断点了哪个按钮的返回值该怎么取呢?
发表于 2020-5-19 17:53 | 显示全部楼层
  1. (defun AlertX(TITLE String nSeconds f / WSH a)
  2.   (setq WSH(vlax-create-object "WScript.shell"))
  3.   (if(vl-catch-all-error-p(setq a(vl-catch-all-apply'vlax-invoke-method(list WSH 'Popup String nSeconds TITLE f))))
  4.     (alert String)(progn(vlax-release-object WSH)a)))

是这样的么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-5 16:40 , Processed in 0.948576 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表