bustr Posted December 15, 2017 Share Posted December 15, 2017 I get the following text in the AutoCAD text window when I try to run a lisp that replaces strings of text. The LISP is locate in the first comment UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: UNPAIRING24 ((-1 . ) (0 . "TEXT") (330 . ) (5 . "71") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "GREEN-012") (100 . "AcDbText") (10 -26.25 23.3125 0.0) (40 . 0.125) (1 . "2LT-5021-PR#1") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 -26.25 23.375 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 2)) Command: Command: Specify opposite corner or [Fence/WPolygon/CPolygon]: Command: Specify opposite corner or [Fence/WPolygon/CPolygon]: Command: Automatic save to C:\Users\z018780\appdata\local\temp\new block_1_1_3403.sv$ ... Command: Command: Quote Link to comment Share on other sites More sharing options...
bustr Posted December 15, 2017 Author Share Posted December 15, 2017 (defun c:UNPAIRING24 () (setq ss_blk (ssget "x" '((0 . "INSERT") (66 . 1)))) (if ss_blk (progn (setq lst_blk (sel2lst ss_blk)) (foreach en_blk lst_blk (setq lst_atts (att2lst en_blk)) (setq str_line "") (foreach en_atts lst_atts (setq str_line (getval 1 en_atts)) (if (not (wcmatch str_line "*/*/*")) (progn (setq str_line (strchg str_line " PR#24" "-1/PR")) (setq str_line (strchg str_line " PR#23" "-1/PR")) (setq str_line (strchg str_line " PR#22" "-1/PR")) (setq str_line (strchg str_line " PR#21" "-1/PR")) (setq str_line (strchg str_line " PR#20" "-1/PR")) (setq str_line (strchg str_line " PR#19" "-1/PR")) (setq str_line (strchg str_line " PR#18" "-1/PR")) (setq str_line (strchg str_line " PR#17" "-1/PR")) (setq str_line (strchg str_line " PR#16" "-1/PR")) (setq str_line (strchg str_line " PR#15" "-1/PR")) (setq str_line (strchg str_line " PR#14" "-1/PR")) (setq str_line (strchg str_line " PR#13" "-1/PR")) (setq str_line (strchg str_line " PR#12" "-1/PR")) (setq str_line (strchg str_line " PR#11" "-1/PR")) (setq str_line (strchg str_line " PR#10" "-1/PR")) (setq str_line (strchg str_line " PR#9" "-1/PR")) (setq str_line (strchg str_line " PR#8" "-1/PR")) (setq str_line (strchg str_line " PR#7" "-1/PR")) (setq str_line (strchg str_line " PR#6" "-1/PR")) (setq str_line (strchg str_line " PR#5" "-1/PR")) (setq str_line (strchg str_line " PR#4" "-1/PR")) (setq str_line (strchg str_line " PR#3" "-1/PR")) (setq str_line (strchg str_line " PR#2" "-1/PR")) (setq str_line (strchg str_line " PR#1" "-1/PR")) (setval 1 str_line en_atts) ) ) ) ) ) ) (setq ss_txtlines (ssget "x" '((0 . "TEXT")))) (if ss_txtlines (progn (setq lst_txtlines (sel2lst ss_txtlines)) (setq str_line "") (foreach en_txtlines lst_txtlines (setq str_line (getval 1 en_txtlines)) (if (not (wcmatch str_line "*/*/*")) (progn (setq str_line (strchg str_line " PR#24" "-1/PR")) (setq str_line (strchg str_line " PR#23" "-1/PR")) (setq str_line (strchg str_line " PR#22" "-1/PR")) (setq str_line (strchg str_line " PR#21" "-1/PR")) (setq str_line (strchg str_line " PR#20" "-1/PR")) (setq str_line (strchg str_line " PR#19" "-1/PR")) (setq str_line (strchg str_line " PR#18" "-1/PR")) (setq str_line (strchg str_line " PR#17" "-1/PR")) (setq str_line (strchg str_line " PR#16" "-1/PR")) (setq str_line (strchg str_line " PR#15" "-1/PR")) (setq str_line (strchg str_line " PR#14" "-1/PR")) (setq str_line (strchg str_line " PR#13" "-1/PR")) (setq str_line (strchg str_line " PR#12" "-1/PR")) (setq str_line (strchg str_line " PR#11" "-1/PR")) (setq str_line (strchg str_line " PR#10" "-1/PR")) (setq str_line (strchg str_line " PR#9" "-1/PR")) (setq str_line (strchg str_line " PR#8" "-1/PR")) (setq str_line (strchg str_line " PR#7" "-1/PR")) (setq str_line (strchg str_line " PR#6" "-1/PR")) (setq str_line (strchg str_line " PR#5" "-1/PR")) (setq str_line (strchg str_line " PR#4" "-1/PR")) (setq str_line (strchg str_line " PR#3" "-1/PR")) (setq str_line (strchg str_line " PR#2" "-1/PR")) (setq str_line (strchg str_line " PR#1" "-1/PR")) (setval 1 str_line en_txtlines) ) ) ) ) ) ) Quote Link to comment Share on other sites More sharing options...
bustr Posted December 15, 2017 Author Share Posted December 15, 2017 I don't speak LISP or any programming language Quote Link to comment Share on other sites More sharing options...
bustr Posted December 15, 2017 Author Share Posted December 15, 2017 NEVER MIND. It was a mistake in the text to be changed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.