0 Members and 1 Guest are viewing this topic.
)); end cond); end while(princ)); end defun;;;;(princ) ;;; end of PHCMain.lsp;;;;
Here is the lisp that I would like to add.
(defun C:fx ( / stylist txtstyle ss indx ent ent_alst str) (setvar "cmdecho" 0) (command "_.undo" "be") (setq stylist '("NOTES" "DWGTITLE" "HANDDWGTITLE" "RMNAMES")) (while (/= stylist nil) (setq txtstyle (car stylist)) (if (= (tblsearch "STYLE" txtstyle) nil) (command "-style" txtstyle "simplex.shx" 0 0.7 0 "No" "No" "No") (fixtxtstyle txtstyle) ) (setq stylist (cdr stylist)) ) (setq ss (ssget "X" '((-4 . "<AND")(-4 . "<OR")(0 . "TEXT")(0 . "MTEXT")(-4 . "OR>") (-4 . "<OR")(7 . "NOTES")(7 . "DWGTITLE")(7 . "HANDDWGTITLE") (7 . "RMNAMES")(-4 . "OR>")(-4 . "AND>")))) (setq indx 0) (while (<= indx (- (sslength ss) 1)) (setq ent (ssname ss indx)) (setq ent_alst (entget ent)) (cond ((= (cdr (assoc 0 ent_alst)) "TEXT") (setq ent_alst (subst (cons 41 0.7) (assoc 41 ent_alst) ent_alst)) ) ((= (cdr (assoc 0 ent_alst)) "MTEXT") (setq str (cdr (assoc 1 ent_alst))) (if (/= (vl-string-position (ascii ";") str) nil) (progn (setq str (strcat "{" (substr str (+ (vl-string-position (ascii ";") str) 2)))) (setq ent_alst (subst (cons 1 str) (assoc 1 ent_alst) ent_alst)) ) ) ) ) (entmod ent_alst) (entupd ent) (setq indx (1+ indx)) ) (command "_.regen") (command "_.undo" "end") (setvar "textstyle" "NOTES") (setvar "cmdecho" 1) (princ))(defun fixtxtstyle (txtsty / txtsty) (setq txtsty (entget (tblobjname "STYLE" txtsty))) (setq txtsty (subst (cons 41 0.7) (assoc 41 txtsty) txtsty)) (setq txtsty (subst (cons 3 "simplex.shx") (assoc 3 txtsty) txtsty)) (entmod txtsty))
Thank you,Brad