Now I can switch between using dtext or mtext for inserting a text string from the dialog list box. The dialog box routine reads the enclosed text file.
I no longer have to use the code:
(setq TXTX (cdr (assoc 1 (entget (entlast)))))
(if (wcmatch TXTX "*`,*")(BTX-IT))
The (BTX-IT) was a routine that breaks a text file by fing a comma for the break point within the string.
I have now removed all of the "*`,*" in the text file; so that the dtext and mtext can be used without the "*`,*" showing up in the inserted string.
;;;Break text (BTX-IT)
;;;written: Andrzej GUMULA agumula@transprojekt.com.pl
;;;
;;;modified by Tim Willey
;;;What he did was put the whole (main) function in condition with the
;;;while function, so while you select something it will work
That you Lee for solving my problem.
ARCH#NOTE is the selected sting read from the text file: ARCH_ANNO-CUS.rem
(defun c:test (/ s pnt num)
(setq pnt (getpoint "\n* Pick Text Insetion Point..."))
(setq num (getreal "\n* Select Text String Length: [30 40 50]"))
(if (= num nil)(setq num 30))
;;(setq pnt '(0 0 0))
(foreach s (LM:StringWrap ARCH#NOTE num)
(entmake
(list
'(000 . "TEXT")
(cons 040 (getvar 'textsize))
(cons 007 (getvar 'textstyle))
;(cons 041 0.7)
(cons 010 pnt)
(cons 001 s)
)
)
(setq pnt (polar pnt (* 1.5 pi) (* 1.7 (getvar 'textsize))))
)
(princ)
)