夏生生 发表于 2021-12-24 16:07:20

沉底了,捞一下,请各位多包涵,谢谢

guosheyang 发表于 2021-12-24 18:33:41

这个问题对lisp似乎有相当难度    朋友 这段代码你研究下看能否改成适用你那种要求我对反应器不熟悉我把这个里面的alert改成运行放平文字的命令 结果造成死机你研究下看能否改成
(vlr-remove-all)
(setq svr (vlr-sysvar-reactor
(list (cons "VIEWCTR" (getvar "viewctr"))
(cons "VIEWSIZE" (getvar "viewsize"))
)
'((:vlr-sysvarchanged . svcbexample)

)
)
)
(defun svcbexample (r l / data ovc ovs nvc nvs)
(setq data (vlr-data r))
(setq ovc (cdr (assoc "VIEWCTR" data))
ovs (cdr (assoc "VIEWSIZE" data))
nvc (getvar "viewctr")
nvs (getvar "viewsize")
)
(if (not(equal ovc nvc))
(progn
(alert (strcat "\nViewctr has changed. It was: "
(vl-princ-to-string ovc)
" It is now: "
(vl-princ-to-string nvc)
)
)
(setq
data (subst (cons "VIEWCTR" nvc) (assoc "VIEWCTR" data) data)
)
)
)
(if (not(equal ovs nvs))
(progn
(alert (strcat "\Viewsize has changed. It was "
(rtos ovs)
". It is now "
(rtos nvs)
)
)
(setq data
(subst (cons "VIEWSIZE" nvs ) (assoc "VIEWSIZE" data) data)
)
)
)
(vlr-data-set r data)
)

夏生生 发表于 2021-12-25 07:48:39

guosheyang 发表于 2021-12-24 18:33
这个问题对lisp似乎有相当难度    朋友 这段代码你研究下看能否改成适用你那种要求我对反应器不熟悉我 ...

谢谢热心帮助,我也没改成功:lol

bskidtf 发表于 2024-5-19 03:51:06

三维时候估计都会乱,我做了一个任意变化视图,都不会乱的

guosheyang 发表于 2024-5-19 22:18:09

24楼的朋友,放个动图上耒看看
页: 1 2 [3]
查看完整版本: 如何让当前视口中心和四个角点显示特定字符(高飞鸟版主能有空指导更好)