hi, take a look here
BTW, just curious..
(assoc 1 entget_circle1) ???
circle textstring ??
@ojacomarket
i prefer assoc list but in your case (cond (bla)( bla)), suggest foreach but your wild card pattern is too common like: " a*" " b*" " r*", you may get multiple result!!
Try this simple test, just key-in any word, it princ out LT&Layer if wmatch condition met
note: please check if any typos in list ?? it was just quick clipboard edit
(defun c:test (/ lst str)
(setq lst
'((" h*" "HOONEKP" "HOONE")
(" hdet*" "HOONEKP" "HOONEDET")
(" a*" "ASFBET" "TEE")
(" b*" "ASFBET" "TEE")
(" kill*" "KRUUSKILL" "TEE")
(" ak*" "AAREKIVI" "TEE")
(" kt*" "TEERADA" "TEE")
(" pt*" "PINNASTEE" "TEE")
(" paed*" "LA_AED" "AED")
(" aedvund*" "AIAVUND" "AED")
(" vaed*" "VO_AED" "AED")
(" maed*" "RAKAED" "AED")
(" kaed*" "KIVIAED" "AED")
(" myyr*" "MYYR" "AED")
(" r*" "RAJATISP" "RAJATIS")
(" kolv*" "KOLVIK" "HALJASTUS")
(" hek*" "HEKK" "AED")
(" tm*" "KOLVIK" "RELJEEF")
(" np*" "NOLVAPEAL" "RELJEEF")
(" na*" "NOLVAALL" "RELJEEF")
(" kraav*" "KRAAVIPERV" "VEEKOGU")
)
)
(while (and (setq str (getstring t "\nInput text : ")) (/= str ""))
(foreach x lst
(if (wcmatch (strcat " " str) (car x))
;;; (entmake (list (cons 0 "LINE")
;;; (cons 6 (cadr x))
;;; (cons 8 (caddr x))
;;; (cons 10 circle_NEW_coords_1)
;;; (cons 11 circle_NEW_coords_2)
;;; )
;;; )
(princ (strcat "\n" (vl-princ-to-string (cdr x))))
)
)
(princ)
)
)