将以下内容添加到您的acaddoc中。lsp:
- (defun c:auto-ortho-on nil
- (if (= 'vlr-command-reactor (type auto-ortho:reactor))
- (if (not (vlr-added-p auto-ortho:reactor))
- (vlr-add auto-ortho:reactor)
- )
- (setq auto-ortho:reactor
- (vlr-command-reactor nil
- '(
- (:vlr-commandwillstart . auto-ortho:callback)
- (:vlr-commandended . auto-ortho:restore)
- (:vlr-commandcancelled . auto-ortho:restore)
- (:vlr-commandfailed . auto-ortho:restore)
- )
- )
- )
- )
- (princ "\nAuto-Ortho Reactor enabled.")
- (princ)
- )
- (defun c:auto-ortho-off nil
- (if (= 'vlr-command-reactor (type auto-ortho:reactor))
- (vlr-remove auto-ortho:reactor)
- )
- (setq auto-ortho:reactor nil)
- (princ "\nAuto-Ortho Reactor disabled.")
- (princ)
- )
- (defun auto-ortho:callback ( obj arg )
- (if (wcmatch (strcase (car arg) t) "line,pline")
- (progn
- (setq auto-ortho:ortho (getvar 'orthomode))
- (setvar 'orthomode 1)
- )
- )
- (princ)
- )
- (defun auto-ortho:restore ( obj arg )
- (if (= 'int (type auto-ortho:ortho))
- (setvar 'orthomode auto-ortho:ortho)
- )
- (setq auto-ortho:ortho nil)
- (princ)
- )
- (vl-load-com) (c:auto-ortho-on)
反应堆默认启用;然后,您可以使用以下命令手动启用/禁用反应堆:auto ortho on&auto ortho off。
将为LINE和PLINE命令启用正交模式(触发反应堆的命令可根据需要定制)。
李 |