wcmatch assistance

wcmatch assistance

DC-MWA
Collaborator Collaborator
221 Views
2 Replies
Message 1 of 3

wcmatch assistance

DC-MWA
Collaborator
Collaborator

I'm trying to get this little snippit to work as part of future lisp I'm working on.

I need this part to work and I can't seem to get wcmatch to catch all layers with "door" in them.

What am I missing?

 

(defun c:test (/ plsel pl test1)

(setq
plsel (entsel "\nSelect: ")
pl (car plsel)
)

(setq test1 (cdr (assoc 8 (entget pl))))
(alert (strcat test1))
(if (wcmatch test1 "*DOOR*")
(alert "yes door")
(alert "no door")
)

(princ)
)

0 Likes
Accepted solutions (1)
222 Views
2 Replies
Replies (2)
Message 2 of 3

komondormrex
Mentor
Mentor
Accepted solution

try to uppercase test1 like (strcase test1)  in wcmatch expression. 

0 Likes
Message 3 of 3

DC-MWA
Collaborator
Collaborator
This led me down the correct path. Thank you
0 Likes