Angelo2449
Guest
Hello everyone,
I have a problem with this simple code:
the "°" character is not found in the txt1 string (10:00 am 8.25° 129.88°), if I insert the string instead of the variable, pos1 assumes the right value 13, otherwise nil"
Thank you.
I have a problem with this simple code:
Code:
(defun c:ps (/ str txt1 ed1 pos1 pos2 ang1)
(setq str nil)
(while (= str nil)
(setq str (nentsel "\nseleziona la stringa "))
);;while
(princ "\nstr xxxxxxx ")
(princ str)
(princ "\n")
(setq ed1 (entget (car str)))
(setq txt1 (cdr (assoc 1 ed1))) ;; 10:00:00 8.25° 129.88°
(princ "\ntxt1 xxxxxxx ")
(princ txt1)
(princ "\n")
(setq pos1 (vl-string-search "°" txt1 1))
(princ "\npos1 xxxxxxx ")
(princ pos1)
(princ "\n")
);;defun
Thank you.