HLP: Changing Style with LSP

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.
QUESTION:
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?
Regards,
Bruce
Reply to
Mr. B
Loading thread data ...
Maybe (setvar "TEXTSTYLE" "...") will do what you need?
Juergen
"Mr. B" schrieb:
Reply to
Jürgen Palme
DUH! Oh am I an idiot :(
I've only been writting lisp's files for years... (silly me!)
Thanks!
Bruce
Reply to
Mr. B

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.