TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: w64bit on June 06, 2021, 10:45:11 AM
-
Is there any simple way to ignore casing for getvar "CLAYER"?
-
AFAIK getvar is not case-sensitive.
-
I think I explained poorly.
If I use:
(getvar "CLAYER") "Abcd")
and the layer name is all in caps (ABCD) I have to make another line
(getvar "CLAYER") "ABCD")
in order to get both of them.
But if there is another situation, aBcd, I have to add another line.
That's why I tried to ignore or clean the casing for the result of getvar "CLAYER". Or to find another method.
-
(strcase (getvar 'clayer))
-
Thank you.
-
If you are using wcmatch, I use this helper function to avoid case problems
;;;==========================================================
;;; wcmatch with fix on case
;;;==========================================================
(defun wcmatch_NoCase (string pattern)
(wcmatch (strcase string) (strcase pattern))
)