I've a self-made LSP file I wrote many years ago. I first select an
'existing' line of Text and my routine continues the Text on the next line.
This works fine for my companies 'default' font type (a non-standard Acad
font). This font (ARCHQUIK.SHX) has 5 options after the 'name' when you use
STYLE. However, IF I pick an existing font that is not my 'standard', and
which has more, or less, options, my routine craps out.
This is part of my LISP file:
(princ "\nSelect First line of Text: ")
(setq txt1 (entget (car (entsel))))
(setq txtht1 (cdr (assoc '40 txt1))) ; get height of selection
(setq txtst1 (cdr (assoc '10 txt1))) ; get insert pt of selection
(setq txtly1 (cdr (assoc '8 txt1))) ; get layer of selection
(setq newdist (+ txtht1 (* txtht1 0.618))) ; suggested text line spacing
(setq etxt (getvar "textstyle")) ; get exist Text Style
; set to existing selected text
(setq ntxt (cdr (assoc '7 txt1))) ; GROUP 7 is Text Style - new
(command "-style" ntxt "" txtht1 "" "" "N" "N")
The 'last' line is what can give me problems IF I select another font type.
Is there some way is LISP that will allow my to change my current Font without
using the "-STYLE" command? So that regardless of Height, Oblique, etc.
options, it will change?
18 years ago