乐筑天下

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

[编程交流] 需要右键单击以重新打开我的

[复制链接]

12

主题

40

帖子

28

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-6 09:01:23 | 显示全部楼层 |阅读模式
好的LISP大师!我几乎在需要的地方都有这个。(有些功能仍然不完整,但我知道如何让它们工作)。这是这个Lisp程序应该做的。
 
您将看到一个对话框,其中包含设备类型选项和其他设备选项,然后根据您的选项插入一个块,添加其他拾取的选项,然后继续。单击鼠标右键时,将返回对话框,让您选择不同的选项,以便插入不同的块。
 
除了“右键单击返回对话框”之外,我已经完成了整个工作。谁能帮忙吗?
 
  1. (defun c:notif(/ :dlgId :done);new combined notification
  2. (setq CVR (getvar "useri2")
  3. SCL (GETVAR "userr1")
  4. lyr (getvar "clayer")
  5. osm (getvar "osmode")
  6. )  
  7. (if (= 0 scl)(command (alert "Please Set your scale and try agagin")(exit)))
  8. (COMMAND "OSMODE" "514")
  9. (COMMAND "-LAYER" "s" "F-ALRM-INDC" "")
  10.     (setq :dlgId (load_dialog "notif.dcl"))
  11.   (setq :done 3)
  12. (while (/= :done 0)
  13.     (if (not (new_dialog "DLG_Notif" :dlgId))
  14.       (exit)
  15.       )
  16. (action_tile "devStrobe" "(setq dev 1)")
  17. (action_tile "devHRNStrobe" "(setq dev 2)")
  18. (action_tile "devSPKStrobe" "(setq dev 3)")
  19. (action_tile "devHorn" "(setq dev 4)")
  20. (action_tile "devSpeaker" "(setq dev 5)")
  21. (action_tile "mtWall" "(setq mt 1)")
  22. (action_tile "mtCeil" "(setq mt 2)")
  23. (action_tile "cd15" "(setq cd 15)")
  24. (action_tile "cd30" "(setq cd 30)")
  25. (action_tile "cd75" "(setq cd 75)")
  26. (action_tile "cd95" "(setq cd 95)")
  27. (action_tile "cd110" "(setq cd 110)")
  28. (action_tile "cd135" "(setq cd 135)")
  29. (action_tile "cd177" "(setq cd 177)")
  30. (action_tile "cd185" "(setq cd 185)")
  31. (action_tile "wat25" "(setq wat 4)")
  32. (action_tile "wat5" "(setq wat 5)")
  33. (action_tile "wat1" "(setq wat 1)")
  34. (action_tile "wat2" "(setq wat 2)")
  35. (action_tile "wat75" "(setq wat 7)")
  36. (action_tile "lensClear" "(setq lens 1)")
  37. (action_tile "lensAmber" "(setq lens 2)")
  38. (action_tile "lensCombo" "(setq lens 3)")
  39. (action_tile "spcWP" "(setq wp 1)")
  40. (action_tile "spcWG" "(setq wg 1)")
  41. (action_tile "accept" "(done_dialog 1)")
  42. (action_tile "cancel" "(done_dialog 0)")
  43. (setq :done (start_dialog))
  44. (cond
  45. ((= :done 1)
  46.   (setvar "cmdecho" 0)
  47. (if (= wat 4)(setq watt ".25W"))
  48. (if (= wat 5)(setq watt ".5W"))
  49. (if (= wat 1)(setq watt "1W"))
  50. (if (= wat 2)(setq watt "2W"))
  51. (if (= wat 7)(setq watt "7.5W"))
  52.   (setq :txting 0)
  53. (while (= 0 :txting)
  54.   (initget 0)
  55. (if (= dev 1) (progn (COMMAND "_.-INSERT" "FA_STROBE_ONLYW" pause SCL "" pause CD) (setq :txting 0))(setq :txting 1))
  56. (if (= dev 2) (COMMAND "_.-INSERT" "FA_Hornstrobe" pause SCL "" pause CD))
  57. (if (= dev 3) (COMMAND "_.-INSERT" "FA_Speakerstrobe" pause SCL "" pause CD watt))
  58.   )
  59.   (setvar "cmdecho" 1)
  60.   );done
  61. ((= :done 0)
  62.   (prompt "\nEnd notification command.")
  63.   )
  64. );cond
  65. ;    (if (= 1 cvr)(command "-layer" "s" "F-STRB-COVR" ""))
  66. ;  (setq elast (entlast))
  67. ;    (IF (= 1 CVR)(command "_.-insert" "sg-15cd" "_non"
  68. ;     (cdr (assoc 10 (entget elast))) "1" "" (* 180. (/ (cdr (assoc 50 (entget elast))) pi))))
  69.    ); while
  70.    (unload_dialog :dlgId)
  71. (COMMAND "CLAYER" LYR)
  72. (COMMAND "OSMODE" OSM)
  73. (princ)
  74. )

 
我还附上了LISP和DCL文件。
诺蒂夫。LSP
诺蒂夫。dcl
回复

使用道具 举报

12

主题

179

帖子

167

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-6 11:01:26 | 显示全部楼层
我会冒险做一些类似于。。。
  1. (if *reopen*
  2. (progn
  3. (setq *reopen* nil)
  4. (vlr-remove-all :vlr-mouse-reactor)
  5. ); /progn
  6. ); /if
  7. (if (not *reopen*)
  8. (setq *reopen* (vlr-mouse-reactor nil '((:vlr-beginrightclick . reopendiag))))
  9. ); /if
  10. (defun reopendiag (<rea> <args>)
  11. (:dlgId)
  12. (princ)
  13. ); /defun

 
我不是“大师”(很遥远),所以大师们可能有更好的解决方案。
 
我只是停留在终止右键点击反应堆时,完成了命令;如何触发(vlr删除所有:vlr鼠标反应器)关闭取消按钮,也许。
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-7 06:13 , Processed in 0.846195 second(s), 56 queries .

© 2020-2025 乐筑天下

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