我只是用PLINE我自己O第一个点比10宽度秒。
也许一个脚本可以工作?
我不知道瑞克·诺瓦拉是谁,但这段代码来自另一个网站,他希望所有变量都设置为局部变量,但不知道程序是否值得更新。
-
- ;Tip1583: AHEAD.LSP Add Arrowhead (c)2000, Rick Novara
- (defun C:AH (/ SC LNENT LNAME PCKPT EPT EPT1 EPT2 ANG1 DD PT2 PW)
- ;draws an arrowhead on the end of a line
- (setq XOSMODE (getvar "osmode"))
- (setvar "osmode" 512)
- ;;snap nearest
- (setq SC (getvar "dimscale"))
- (setq LNENT (entsel "Pick near end of line") ;select end of line
- LNAME (car LNENT) ;extract entity name
- PCKPT (cadr LNENT) ;extract selection point
- EPT (osnap PCKPT "endp") ;set endpt of selected line
- EPT1 (cdr (assoc 10 (entget LNAME))) ;extract start pt of line
- EPT2 (cdr (assoc 11 (entget LNAME)))
- ;extract other endpt of line
- ) ;_ end of setq
- (if (equal EPT EPT1) ;test desired endpt is same as start pnt
- (setq ANG1 (angle EPT1 EPT2)) ;if it is set variable for line angle
- (setq ANG1 (angle EPT2 EPT1))
- ;if not - line angle in other direction
- ) ;_ end of if
- (setq PT2 (polar EPT ANG1 (* SC 0.20)))
- ;set arrowhead length, based on current dimscale
- (setq PW (* SC 0.08)) ;set arrowhead width
- (setvar "osmode" 0)
- (command "PLINE" EPT "W" "0" PW PT2 "") ;draw arrowhead
- (setvar "OSMODE" XOSMODE)
- ) ;_ end of defun
- (princ "\nAHEAD.LSP loaded, Type AH to run... ")
|