需要右键单击以重新打开我的
好的LISP大师!我几乎在需要的地方都有这个。(有些功能仍然不完整,但我知道如何让它们工作)。这是这个Lisp程序应该做的。您将看到一个对话框,其中包含设备类型选项和其他设备选项,然后根据您的选项插入一个块,添加其他拾取的选项,然后继续。单击鼠标右键时,将返回对话框,让您选择不同的选项,以便插入不同的块。
除了“右键单击返回对话框”之外,我已经完成了整个工作。谁能帮忙吗?
(defun c:notif(/ :dlgId :done);new combined notification
(setq CVR (getvar "useri2")
SCL (GETVAR "userr1")
lyr (getvar "clayer")
osm (getvar "osmode")
)
(if (= 0 scl)(command (alert "Please Set your scale and try agagin")(exit)))
(COMMAND "OSMODE" "514")
(COMMAND "-LAYER" "s" "F-ALRM-INDC" "")
(setq :dlgId (load_dialog "notif.dcl"))
(setq :done 3)
(while (/= :done 0)
(if (not (new_dialog "DLG_Notif" :dlgId))
(exit)
)
(action_tile "devStrobe" "(setq dev 1)")
(action_tile "devHRNStrobe" "(setq dev 2)")
(action_tile "devSPKStrobe" "(setq dev 3)")
(action_tile "devHorn" "(setq dev 4)")
(action_tile "devSpeaker" "(setq dev 5)")
(action_tile "mtWall" "(setq mt 1)")
(action_tile "mtCeil" "(setq mt 2)")
(action_tile "cd15" "(setq cd 15)")
(action_tile "cd30" "(setq cd 30)")
(action_tile "cd75" "(setq cd 75)")
(action_tile "cd95" "(setq cd 95)")
(action_tile "cd110" "(setq cd 110)")
(action_tile "cd135" "(setq cd 135)")
(action_tile "cd177" "(setq cd 177)")
(action_tile "cd185" "(setq cd 185)")
(action_tile "wat25" "(setq wat 4)")
(action_tile "wat5" "(setq wat 5)")
(action_tile "wat1" "(setq wat 1)")
(action_tile "wat2" "(setq wat 2)")
(action_tile "wat75" "(setq wat 7)")
(action_tile "lensClear" "(setq lens 1)")
(action_tile "lensAmber" "(setq lens 2)")
(action_tile "lensCombo" "(setq lens 3)")
(action_tile "spcWP" "(setq wp 1)")
(action_tile "spcWG" "(setq wg 1)")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq :done (start_dialog))
(cond
((= :done 1)
(setvar "cmdecho" 0)
(if (= wat 4)(setq watt ".25W"))
(if (= wat 5)(setq watt ".5W"))
(if (= wat 1)(setq watt "1W"))
(if (= wat 2)(setq watt "2W"))
(if (= wat 7)(setq watt "7.5W"))
(setq :txting 0)
(while (= 0 :txting)
(initget 0)
(if (= dev 1) (progn (COMMAND "_.-INSERT" "FA_STROBE_ONLYW" pause SCL "" pause CD) (setq :txting 0))(setq :txting 1))
(if (= dev 2) (COMMAND "_.-INSERT" "FA_Hornstrobe" pause SCL "" pause CD))
(if (= dev 3) (COMMAND "_.-INSERT" "FA_Speakerstrobe" pause SCL "" pause CD watt))
)
(setvar "cmdecho" 1)
);done
((= :done 0)
(prompt "\nEnd notification command.")
)
);cond
; (if (= 1 cvr)(command "-layer" "s" "F-STRB-COVR" ""))
;(setq elast (entlast))
; (IF (= 1 CVR)(command "_.-insert" "sg-15cd" "_non"
; (cdr (assoc 10 (entget elast))) "1" "" (* 180. (/ (cdr (assoc 50 (entget elast))) pi))))
); while
(unload_dialog :dlgId)
(COMMAND "CLAYER" LYR)
(COMMAND "OSMODE" OSM)
(princ)
)
我还附上了LISP和DCL文件。
诺蒂夫。LSP
诺蒂夫。dcl 我会冒险做一些类似于。。。
(if *reopen*
(progn
(setq *reopen* nil)
(vlr-remove-all :vlr-mouse-reactor)
); /progn
); /if
(if (not *reopen*)
(setq *reopen* (vlr-mouse-reactor nil '((:vlr-beginrightclick . reopendiag))))
); /if
(defun reopendiag (<rea> <args>)
(:dlgId)
(princ)
); /defun
我不是“大师”(很遥远),所以大师们可能有更好的解决方案。
我只是停留在终止右键点击反应堆时,完成了命令;如何触发(vlr删除所有:vlr鼠标反应器)关闭取消按钮,也许。
页:
[1]