I have to explain again what I am looking for.
I don't want to select all the text in the layer.
I have two types of text. The form of the text is like
061676614011 (12 numbers) or something like this
06167AG01949. The numbers are changing but the text AG if exist in the text is all the time the same and in the same possition (in the midle of the text).
I already have a code that select all the duplicate text in the drawing (from PST layer) and change color.
I want an extra check for this texts in PST Layer, and the check is
To search if in this layer exist a text with problem in spelling. If a text is not like
061676614011 (12 numbers) or something like this
06167AG01949 , is something alse for example
06167661401G , 06167AK01949, O6167AG01949, D6167AG01949 etc the select and this spesific text and change the color to this text .
(defun C:TFD
(/ *error* doc mss n tc tclist duplist tcss
); = Text [& Mtext] Find Duplicates (if (not (wcmatch errmsg
"Function cancelled,quit / exit abort,console break")) ); if
); defun - *error*
(setq TFDss
(ssadd)); initially empty duplicates selection set ; = text content of each
; = already in duplicates list [do nothing]
; = already in content list [put in duplicates list]
; = first instance of it [put in content list]
); cond
); repeat
(setq col
0); base value for counting color numbers upward
(foreach tc duplist
; assign colors to sets of duplicates ;;; (command "_.layer" "_make" "Text" "_color" 7 "" "")
;;; (command "_.chprop" tcss "" "_color" (setq col (1+ col)) "")
;;; (command "_.chprop" tcss "" "_layer" "Text" "")
(command "_.chprop" tcss
"" "_color" 230 "") ; put in collective duplicates selection set
); foreach
(prompt "\nNo Text/Mtext objects with duplicate text content found."); else ); if
); progn
); if
); end defun
Thanks