随便弄了一下:  - (defun C:KK ()
- (setvar "cmdecho" 0)
- (setq os (getvar "osmode"))
- (setvar "osmode" 512)
- (setq p1 (getpoint "\n请选取第一条线:) "))
- (setvar "osmode" 128)
- (setq p2 (getpoint p1 "\n请选取第二条线:"))
- (setq dis (/ (distance p1 p2) 2.0))
- (command "offset" dis p1 p2 "" "CHANGE" "L" "" "p" "LTYPE" "Center" "c" "1" "" )
- (setvar "osmode" os)
- (princ)
- )
|