I am trying to do a wildcard match of everyline of a list and if it contains *-H-* remove it from the list.
despite my best efforts i cant seem to overcome this hurdle...
the goal is to remove all the hydraulic(*-H-*) drawings from the list
here is an example of the name:
this is my attempt:
Im pretty new to lisp so any advice on my coding would be greatly appreciated.Code:(defun C:MMCoord (/) (setq dwgpath (getvar "dwgprefix") dwgname (if (= (strlen (getvar "dwgname")) 20) (getvar "dwgname") (exit) ) discipline (substr dwgname 8 1) level (substr dwgname 10 3) namelist (vl-directory-files dwgpath (strcat "*-*-" level "-*.dwg") 1) ) (setq dwgnamelist (foreach temp1 namelist (lambda (temp1) (if (= nil (wcmatch temp1 "*-H-*")) (list temp1) (nil) ) ) ) ) princ dwgnamelist )