What should variable dfus be? It isn't being set to anything (setq dfus). If it is the length of the pline then use the top lisp below. If you want to set it use the bottom lisp.
(defun c:lslope ( / slope obj len drop)
;(setq slope (getreal "\nEnter slope"))
(setq slope 0.125)
(setq obj (vlax-ename->vla-object (car (entsel "\nPick Pline "))))
(setq Len (vlax-get Obj 'Length))
(setq drop (+ (/ (* len slope) 12.0) 30))
(cond ( (<= len 180.0) (setq dia "4"))
( (<= len 700.0)(setq dia "6"))
( (<= len 1600.0)(setq dia "8"))
( (> len 1600.0) (alert "dfus is greater than 1600\nwill now exit") (vl-exit-with-error ""))
)
(command "qleader"
(getpoint "\nPick 1st leader point")
(getpoint "\nPick end point") "" 0
(strcat dia (chr 34) " SANITARY SEWER INVERT" "\\P" " @ " (rtos drop 4) " BELOW FINISHED FLOOR 1/8 SLOPE " (rtos len 4) " DFUS")
""
)
)
(defun c:lslope ( / slope obj len drop dfus dfust)
;(setq slope (getreal "\nEnter slope"))
(setq slope 0.125)
(setq obj (vlax-ename->vla-object (car (entsel "\nPick Pline "))))
(setq Len (vlax-get Obj 'Length))
(setq drop (+ (/ (* len slope) 12.0) 30))
(setq dfus (getreal "\nEnter DFUS Value : "))
(cond ( (<= dfus 180.0) (setq dia "4"))
( (<= dfus 700.0)(setq dia "6"))
( (<= dfus 1600.0)(setq dia "8"))
( (> dfus 1600.0) (alert "dfus is greater than 1600\nwill now exit") (vl-exit-with-error ""))
)
(if (zerop (rem dfus 1.0)) (setq dfust (itoa (fix dfus))) (setq dfust (rtos dfus 4)))
(command "qleader"
(getpoint "\nPick 1st leader point")
(getpoint "\nPick end point") "" 0
(strcat dia (chr 34) " SANITARY SEWER INVERT" "\\P" " @ " (rtos drop 4) " BELOW FINISHED FLOOR 1/8 SLOPE " dfust " DFUS")
""
)
)
I am off to bed as I need plenty of beauty sleep. Will try to answer any further questions in the morning.