(defun C:OFFWL (/ test aa x sidea sideb)
(setvar "cmdecho" 0)
(setq das "WL4")
(setq das1 "WL5")
(setq test T)
(setq aa (/ (getreal "\nInput the diameter of WATER LINE: ") 2))
(while (/= test nil)
    (command "osnap" "nea")
    (setq x (getpoint "\nSelect the center line of WATER LINE : "))
    (if (/= x nil)
        (progn
            (setq bb (ssget x))
            (setq cc (ssname bb 0))
            (command "change" cc "" "la" das1)
            (command "osnap" "none")
            (setq sidea (list (+ (car x) 1)(+ (cadr x) 1)))
            (setq sideb (list (- (car x) 1)(- (cadr x) 1)))
            (command "offset" aa x sidea "")
            (command "change" "last" "" "la" das)
            (command "offset" aa x sideb "")
            (command "change" "last" "" "la" das)
        )
        (progn
            (setq test nil)
        )
    )
)
(command "setvar" "highlight" 1)
(setvar "cmdecho" 1)
(command "osnap" "none")
(print)
)
