You are on page 1of 1

la vi(defun c:CMTF (Str / Item TLength Char New);;; clear mtext format in string

(setq Item 1 TLength (strlen Str) New "")


(while (<= Item TLength)
(setq Char (substr Str Item 1))
(if (= Char "\\")
(progn
(setq Item (1+ Item))
(setq Char (substr Str Item 1))
(cond
((member Char '("\\" "f" "F" "C" "H" "S" "T" "Q" "W"))
(while (and (/= Char ";") (<= Item TLength))
(setq Item (1+ Item))
(setq Char (substr Str Item 1))
);end while
)
((= Char "P")
(setq New (strcat New "\n"))
)
((member Char '("{" "}"))
(setq New (strcat New Char))
)
);end cond
);end progn
(if (not (member Char '("{" "}")))
(setq New (strcat New Char))
);end if
);end if
(setq Item (1+ Item))
);end while
(cond (New) (T ""))
);end ClearMTFormate

You might also like