(defun C:SPEX (/ S1 NS ENTM SNTB SNTE S SLEN S SLEN NAME BR PNTB PNTE)
  (setq cmd (getvar "cmdecho"))
  (setq blp (getvar "blipmode"))
  (setvar "cmdecho" 0)
  (setvar "blipmode" 0)
  (princ "\nSelect boundary edg...\n")
  (setq s1 (entsel)) (terpri)
  (setq ns (car s1))
  (setq entnm (entget ns))
  (setq sntb (cdr (assoc 10 entnm)))
  (setq snte (cdr (assoc 11 entnm)))
  (command "extend" edge "")
  (princ "\nSelect object to extend...\n")
  (setq s (ssget))
  (setq slen (ssiength s))
  (setq count 0)
  (while (< count slen)
   (setq name (ssname s count))
   (setq entnm (entget name))
   (setq br (cdr (assoc 0 entnm)))
   (if (= br "line")
    (progn
        (setq pntb (cdr (assoc 10 entnm)))
        (setq pnte (cdr (assoc 11 entnm)))
        (if (setq sq (inters pntb pnte sntb snte nil))
         (progn
)
