本帖最后由 yangchao2005090 于 2020-6-24 08:25 编辑
下面是论坛的代码,能否实现自己命令行输入两边的偏移距离(输入一次比如,100,自动两侧偏移100,如果能够记忆功能最好,比如下次直接是100),生成中心线保留
- ;;http://bbs.mjtd.com/thread-180485-1-1.html
- (defun c:tt (/ en lay)
- (command "-layer" "m" "aa" "c" 1 "" "L" "continuous" "" "");创建新层
- (setq lay(getvar "clayer"))
- (setvar "clayer" "aa")
- (setvar "OSMODE" 15359)
- (command "_.PLINE")
- (while (> (getvar "CMDACTIVE") 0) (command PAUSE))
- (setq en( vlax-ename->vla-object (entlast)))
- (vla-offset en 50)
- (vla-offset en -50)
- (entdel en)
- (setvar "clayer" lay)
- )
|