(defun c:TxtUpdate ( / *error* _read dcfilename strfilename strlst ss dctag ptr dcflag str ) ;; © Lee Mac 2010(setq dcfilename"txtUpdate.dcl" ;; DCL Filename Strfilename "txtUpdate.txt" ;; Data Filename) (defun *error* ( msg ) (and dcTag (unload_dialog dcTag)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (defun _read ( file / ofile lst nl ) (cond ((setq ofile (open file "r")) (while (setq nl (read-line ofile)) (setq lst (cons nl lst))) (close ofile))) (reverse lst) ) (cond ((not (setq Strfilename (findfile Strfilename))) (princ "\n** Data File not Found **")) ((not (setq StrLst (_read Strfilename))) (princ "\n** Data File Empty **")) ((not (setq ss (ssget "_:L" '((0 . "*TEXT")))))) (( Yep works ok would need to be able to put text as a prefix aswell as a suffix thou. How would the code be altered to do this Change:
(subst (cons 1 (strcat (cdr (assoc 1 (entget ent))) str)) (assoc 1 (entget ent)) (entget ent))
to
(subst (cons 1 (strcat str (cdr (assoc 1 (entget ent))))) (assoc 1 (entget ent)) (entget ent))
I'll leave the adding of prompts to you if you like - just remember to mark/initial where modifications are made. Sounds a bit like this, for those interested:
http://www.jtbworld.com/dimnotes.htm This is a very handy LISP routine!Thanks very much for sharing it.
I do have a question:
I've added the line " \U+2104" to the associated text file to add the centerline symbol to dimensions. On my computer, using ACAD2011/Win7 64bit, the dialog box shows the centerline symbol in the list.On another machine with ACAD2008/XP Pro 64bit it shows up as a small vertical rectangle in the dialog box list. I checked Options/Display/Fonts and both copies of AutoCAD use the same font settings.Is the problem with displaying the correct symbol an operating system issue?Is there a setting in XP that will let the dialog box show the correct symbol?
Thanks-
Mike Thanks CADapult, glad you like it
As for the display, this would be something inherent to how the DCL interacts with XP or different versions of AutoCAD, I'm not sure how one would go about changing that
页:
1
[2]