Steven P Posted 3 hours ago Posted 3 hours ago I'll put this one here for later. I have a suspicion that the text is still there, just not visible - very small perhaps. This will show all the mtext values (first 256 characters anyway) in the drawing. Run it after your unformat just to confirm that the texts have been deleted or are just not visible. (defun c:GrabTexts ( / MySS acount MyEnt) (setq myss (ssget "_X" '((0 . "mtext")))) (setq acount 0) (while (< acount (sslength myss)) (setq Myent (ssname Myss acount)) (princ "\n")(princ (assoc 1 (entget MyEnt))) (setq acount (+ acount 1)) ) ; end while ) 1 Quote
Nikon Posted 3 hours ago Author Posted 3 hours ago 29 minutes ago, GLAVCVS said: Write before (vla-put-textstring obj (vla-get-TextString obj)) this: (print (vla-get-TextString obj)), загрузите, запустите и опубликуйте скриншот того, что произошло в командной строке PS: Also make sure you've closed all the parentheses in your Lisp expression: your last message seems to be missing a closing parenthesis. ((= otyp "MTEXT")(print (vla-get-TextString obj))(vla-put-TextString obj (supriFMT (vla-get-TextString obj)))) ; AcDbMText It looks like it worked! Thank you all! I'll test it again. 1 Quote
Nikon Posted 3 hours ago Author Posted 3 hours ago 34 minutes ago, GLAVCVS said: Write before (vla-put-textstring obj (vla-get-TextString obj)) this: (print (vla-get-TextString obj)), загрузите, запустите и опубликуйте скриншот того, что произошло в командной строке PS: Also make sure you've closed all the parentheses in your Lisp expression: your last message seems to be missing a closing parenthesis. ((= otyp "MTEXT")(print (vla-get-TextString obj))(vla-put-TextString obj (supriFMT (vla-get-TextString obj)))) ; AcDbMText It looks like it worked! Thank you all! I'll test it again. But I still haven't figured out what the problem is... 1 Quote
GLAVCVS Posted 2 hours ago Posted 2 hours ago 4 minutes ago, Nikon said: ... But I still haven't figured out what the problem is... Maybe you deleted some parentheses when you removed the T argument. Quote
Nikon Posted 2 hours ago Author Posted 2 hours ago (edited) No, I didn't understand why the first code didn't work. Edited 2 hours ago by Nikon Quote
Nikon Posted 2 hours ago Author Posted 2 hours ago 59 minutes ago, Steven P said: I have a suspicion that the text is still there, just not visible - very small perhaps. This will show all the mtext values (first 256 characters anyway) in the drawing. Run it after your unformat just to confirm that the texts have been deleted or are just not visible. (defun c:GrabTexts ( / MySS acount MyEnt) (setq myss (ssget "_X" '((0 . "mtext")))) (setq acount 0) (while (< acount (sslength myss)) (setq Myent (ssname Myss acount)) (princ "\n")(princ (assoc 1 (entget MyEnt))) (setq acount (+ acount 1)) ) ; end while ) GRABTEXTS Writing on the command line: (1 . ) (1 . ) Quote
GLAVCVS Posted 1 hour ago Posted 1 hour ago 1 hour ago, Nikon said: No, I didn't understand why the first code didn't work. It's simply that your version of LM:UnFormat (I don't know if it's the original or modified one) isn't compatible with some localized versions of AutoCAD. Is your version of AutoCAD 2019 on the same PC as the 2021 version? 1 Quote
Nikon Posted 56 minutes ago Author Posted 56 minutes ago 54 minutes ago, GLAVCVS said: Is your version of AutoCAD 2019 on the same PC as the 2021 version? Yes, both versions are on the same computer. And before that, everything worked in autocad 2015. That's why I'm at a loss. Thank you very much. Quote
Lee Mac Posted 7 minutes ago Posted 7 minutes ago Try setting LISPSYS=0 if you haven't already. Quote
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.