yswoyh 发表于 2005-9-8 14:35:00

[LISP]求助老师!!!!!! LSp程序

请问我想用PLine线画线,,在我输入命令PLine的回车的时候,,CAD提示输入( Z)高程 ,线画后自动把线加宽到(0.15米)!!!谢谢各位!!!

LONGXIN 发表于 2005-9-12 00:15:00

(defun c:pll (/ pt1 wide)<BR>&nbsp; (setvar "cmdecho" 0)<BR>&nbsp; (setq pt1 (getpoint "\n输入点:"))<BR>&nbsp; (if&nbsp; pt1<BR>&nbsp;&nbsp;&nbsp; (progn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (command "pline" pt1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq pt1 (getpoint pt1 "\n输入点:"))<BR>&nbsp;&nbsp;&nbsp; )<BR>&nbsp; )<BR>&nbsp; (if&nbsp; pt1<BR>&nbsp;&nbsp;&nbsp; (progn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (while pt1<BR>&nbsp;(command pt1)<BR>&nbsp;(setq pt1 (getpoint pt1))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (command "")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wide (getreal "\n输入高程:"))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= nil wide)<BR>&nbsp;(setq wide 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (command "change" "l" "" "p" "e" wide "")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (command "pedit" "l" "w" 0.15 "")<BR>&nbsp;&nbsp;&nbsp; )<BR>&nbsp; )<BR>)

yxp 发表于 2005-10-5 23:15:00

设置PLINEWID来控制线宽会不会好些呢?
页: [1]
查看完整版本: [LISP]求助老师!!!!!! LSp程序