I was thinking that you make a menu item (or items) somehow, to create those
things, which you mostly only need to use within a drawing that you're going
to save as a template. Then any drawing based on that scale-specific
template will have it all set to go. But you could also use the same menu
item(s) to set them up in a drawing that isn't based on the template, as
long as the general scale factor is set, either using "dimscale" or a
"useri#" variable. Whichever one would need to be entered by the user,
either picked off a list as in my earlier example, or asked for as in yours.
One advantage of picking it off a list in a screen or pull-down menu is that
there's no chance of an error such as entering 95 instead of 96.
You can set up text styles using that information by various methods (lisp,
macro, whatever), and just when the text height is asked for, do (in your
size example):
(* (/ 3.0 32) (getvar "dimscale"))
and it will size it appropriately. [Make sure you make one of the numbers a
real (with a decimal) rather than an integer, because dividing an integer by
an integer will give you an integer result (zero in this case). Or you can
avoid that problem by doing
(* 0.09375 (getvar "dimscale"))
if you prefer.]
If by "text style information" you mean font, you can also have them pick
that off a list if you want to limit the options. And if you want to make
more than one style based on the same font (as my earlier example does with
two fixed sizes), you can save that, too:
(setq textfont (getstring "Text font for making typical Styles: "))
or have the menu list item set that variable. Then feed in 'textfont' at
the point in the Style command(s) where it asks for that:
(command "style" "typ3-32nds" textfont (* 0.09375 (getvar "dimscale")) "" ""
"" "")
or in macro format, something like
-Style typ3-32nds !textfont (* 0.09375 (getvar "dimscale")) ;;;;
with the ending parts dependent on the kind of font file -- how many enters
if you want all defaults at the end, or otherwise variable as you prefer, if
you don't. That way they can give it one font name and it can be used to
make multiple text styles. An advantage of picking the font off a list is
that you can limit it to those that will have the same number of prompts at
the end (AutoCAD .SHX fonts will have the vertical option), or you can have
the Style command use a different number of prompts for .TTF or some
non-ACAD .SHX fonts by including something about that in what the menu
selection returns.
--
Kent Cooper
wrote...
I can see how that would work out. More specifically I was thinking of
creating a template (.dwt) with the text size and font along with the
dimscale information directly associated with the scale of choice.
For example, if I start a drawing from scratch and go to Dimension Style,
under the Fit tab and Scale for Dimension Features, I can select Use Overall
Scale Of... and input the desired scale factor (example - 96).
Additionally I can set the default text size under the Text tab and set the
text height to 3/32" for example. This gets me a dimension text size of 9"
on a 1/8" scale drawing.
Can the text style information be handled in a similar fashion?