本帖最后由 叶曲冰寒 于 2014-6-12 17:03 编辑
 - (defun c:tt()
-
- (setq st 1)
- (setq pt1 (getpoint))
- (setq pt2 pt1)
- (setq newline1 (hel_Line pt1 pt2))
- (setq newline (hel_Line pt1 pt2))
- (setq newline2 (hel_Line pt1 pt2))
- (vlax-put-property newline 'Color 1)
- (vlax-put-property newline1 'Color 2)
- (vlax-put-property newline2 'Color 2)
- (vlax-put-property newline 'LineType "dash")
- (while st
- (setq get (grread 1))
- (if (= (hel_n1h get) 5)
- (progn
- (setq pt2 (hel_n2h get))
- (setq rad (+ (angle pt1 pt2) (/ pi 2)))
- (setq pt11 (polar pt1 rad -100))
- (setq pt12 (polar pt2 rad -100))
- (setq pt21 (polar pt1 rad 100))
- (setq pt22 (polar pt2 rad 100))
- (vlax-put-property newline 'EndPoint (vlax-3d-point pt2))
- (Vlax-Put-Property newline1 'EndPoint (Vlax-3d-Point pt12) )
- (Vlax-Put-Property newline1 'StartPoint (Vlax-3d-Point pt11) )
- (Vlax-Put-Property newline2 'EndPoint (Vlax-3d-Point pt22) )
- (Vlax-Put-Property newline2 'StartPoint (Vlax-3d-Point pt21) )
- )
- (setq st nil)
- )
- )
- )
该贴已经同步到 叶曲冰寒的微博 |