在kwok老师的程序上进行了修改,希望不要介意,学习了一上午,弄清楚怎么创建组[em0] 果断的低效率。
在选择集创建上还是比较傻的方法。继续努力学习~
 - (defun c:ttt (/ w pline)
- (command ".undo" "be")
- (setq L (getreal "\n 正偏宽度<1000.0>: "))
- (setq R (getreal "\n 负偏宽度<L>: "))
- (if (null L)
- (setq L 1000)
- )
- (if (null R)
- (setq R L)
- )
- (vl-cmdf ".spline")
- (while (= 1 (getvar "cmdactive")) (vl-cmdf pause))
- (setq pline (entlast))
- (setq plinelist (ssget "L"))
- (vla-Offset (vlax-ename->vla-object pline) (/ R 2.0))
- (setq plineL (entlast))
- (ssadd plineL plinelist)
- (vla-Offset (vlax-ename->vla-object pline) (/ L -2.0))
- (setq plineR (entlast))
- (ssadd plineR plinelist)
- (command "chprop" pline "" "lt" "center" "s" 200 "")
- ;;;中心线比例200
- (command "._undo" "_begin" "._-group" "_create"
- "*" "Road" plinelist ""
- "._undo" "_end"
- )
- ;(command ".undo" "e")
- (princ)
- )
|