First of all, a polyline can be associated with more than one HATCH. Also could be just partially associated.
So the routine checks the number of associated HATCHs and if the AREA of both PL and HATCH is same, then is excluded from the selection set.
(vl-load-com)
(defun c:SelectPolyNoHatch ( / ss i en lst obj ar1 ar2)
(if (setq ss (ssget "_X" (list '(0 . "LWPOLYLINE") '(-4 . "&=") '(70 . 1) (cons 410 (getvar 'CTAB)))))
(repeat (setq i (sslength ss))
(setq en (ssname ss (setq i (1- i))))
(if (and (setq lst (vl-remove-if-not (function (lambda (x) (and (= 330 (car x)) (= "HATCH" (cdr (assoc 0 (entget (cdr x)))))))) (entget en)))
(= 1 (length lst))
(setq obj (vlax-ename->vla-object (cdar lst)))
(not (vl-catch-all-error-p (setq ar1 (vl-catch-all-apply 'vla-get-area (list obj)))))
(setq obj (vlax-ename->vla-object en))
(not (vl-catch-all-error-p (setq ar2 (vl-catch-all-apply 'vla-get-area (list obj)))))
(equal ar1 ar2 1e-6))
(ssdel en ss))))
(if (and ss (> (sslength ss) 0))
(sssetfirst nil ss))
(princ)
)