Hi
I want to replace a specific chars from the first text and replace it with another within the text selection .
I have reach to the end but the result is nil ..... I think the use of - subst - is not correct.
any help would be appreciated ..
Code:
(defun c:txt (/ 1txt 2txt curTxt entTxt all pt)
(vl-load-com)
(setq 1txt (getstring"\nEnter the old Char.:"); example 123
2txt (getstring"\nEnter the replaced Char.:"); example the
curTxt(car(entsel"\nSelect Text:")); Ref123ok
entTxt(cdr (assoc 2 (entget curTxt)))
)
(setq all (subst (2txt) (1txt) entTxt)
hgt (cdr (assoc 40 (entget curTxt))))
(setq pt (getpoint"\nNew text Location: "))
(command "_.text" pt hgt "" all "")
(princ)
)
; result must be = Reftheok
Regards
Tharwat