Text Question
When editing Multi-line text (in a drawing created in AutoCAD 2008), there are a series of extra characters that show up in the editing window. It looks more like this:\pxqc:{ACTUAL TEXT IN DRAWING}The character before the text and the {} don't show up in the drawing, but its a bit aggravating. When I create new new in Bricscad none of these characters show up in the editing box. Any thoughts?
Comments
-
Autocad adds characters to change features such as layer, colour, size of all or part of a string of text or mtext.You can add them manually if you know what they all mean.I have lisps for getting rid of them, one for text and one for mtext if you want I can email them or post them here. Never sure if this forum is happy to be cluttered with lisps.
0 -
Thanks John,That would be great. You could forward them to jhk@noklu.net
0 -
Not sure they arrived so I will post here after all.
(defun c:Mtxtstrip ()(setq ss (ssget "x" (list (cons 0 "MTEXT"))) len (sslength ss) num 0 n 1)(while (/= num len)(setq a (entget (ssname ss num)) str (cdr (assoc 1 a)) str1 str l (strlen str) d nil n 1)(if (= "{" (substr str 1 1))(setq str1 (substr str 2) l (strlen str1)))(if (= "}" (substr str1 l))(setq str1 (substr str1 1 (1- l)) l (strlen str1)))(while (/= l n)(if (= ";" (substr str1 n 1))(setq str1 (substr str1 (1+ n)))(setq n (1+ n))))(setq a (subst (cons 1 str1)(assoc 1 a) a))(entmod a)(terpri)(setq num (1+ num))))(defun c:txtstrip ()(setq ss (ssget "x" (list (cons 0 "TEXT"))) len (sslength ss) num 0 n 1)(while (/= num len)(setq a (entget (ssname ss num)) str (cdr (assoc 1 a)) str1 str l (strlen str) d nil n 1)(if (= "{" (substr str 1 1))(setq str1 (substr str 2) l (strlen str1)))(if (= "}" (substr str1 l))(setq str1 (substr str1 1 (1- l)) l (strlen str1)))(while (/= l n)(if (= ";" (substr str1 n 1))(setq str1 (substr str1 (1+ n)))(setq n (1+ n))))(setq a (subst (cons 1 str1)(assoc 1 a) a))(entmod a)(terpri)(setq num (1+ num))))
0 -
NEW Post code easy! Easily post code with the new "Insert code tags" function. Your code will be viewed in a code font inside a box with a scrollbar. Just replace “Paste code here” by your lisp routines or other non-html code. Please use this function from now on when posting code.
0 -
John, this is a great idea, but I can't get these routines to work (in 8.2.6).It loads with no complaint, but when I type "txtstrip" or "Mtxtstrip" I get "Unable to recognize command". That's all. None of those snide remarks it makes about any new lisps that I write. It just denies that I loaded the command. Bizarre.
0 -
I will try and post that way in future.............Not sure it matters, but I have them as 2 separate files.I have to admit I don't think I have tried it in 8.2.6, except in a file with no characters. There it just runs and returns the number text or mtexts in the file. I don't currently have a file with the characters.I believe it used to just freeze in that case and you had to ESC it. The new lisp engine gives a much better idea of where a routine fails, but rough and clumsy as these lisps are they don't really have anything "contentious" in them.
0