i have a partial code here to an old lisp that inserts text from a file
line by line. however it inserts it as mtext and at a set width and i would like to if anyone can tell me what to change to make it work. everything i change that i think it could be, just gives me errors when i try to run it.
any help is appreciated
(defun INSRT (/ NEWTXT INS1 TXTHT INDX TEXTLINE)
(setq INS1 (getpoint "\nChoose Insert Point For Mtext: ")
TXTHT (* 0.125 (getvar "DIMSCALE"))
COUNTER 0
NEWTXT ""
) ;_ end of setq
(while (/= PICK "")
(setq INDX (read PICK)
TEXTLINE (nth INDX TXTLIST)
) ;_ end of setq
(if (/= INDX 0)
(progn (setq COUNTER (1+ COUNTER)
COUNTER (itoa COUNTER)
NEWTXT (strcat NEWTXT TEXTLINE)
COUNTER (atoi COUNTER)
) ;_ end of setq
) ;progn
) ;if
(cond ((< INDX 10) (setq PICK (substr PICK 3)))
((and (< INDX 100) (> INDX 9)) (setq PICK (substr PICK 4)))
((> INDX 99) (setq PICK (substr PICK 5)))
) ;cond
) ;while
(entmake (list '(0 . "mtext")
'(100 . "AcDbEntity")
'(67 . 0)
'(8 . "0")
'(100 . "AcDbmText")
(list '10 (car INS1) (cadr INS1) (caddr INS1))
(cons '40 TXTHT)
(cons '41 (* 4.0 (getvar "dimscale")))
'(71 . 1)
'(72 . 1)
(cons '1 NEWTXT)
'(7 . "ROMANS")
'(210 0.0 0.0 1.0)
'(11 1.0 0.0 0.0)
) ;_ end of list
)
)