Author Topic: Macro to Scale Dimension Arrowhead in relation to Text Size  (Read 984 times)

Lar

  • Hero Member
  • *****
  • Posts: 2580
Hi all,

Below is a macro to use whenever you are creating a new dimension and using a different text size from the default. It scales the arrowhead size in relation to the new text size

My default arrowhead factor is 0.75. To change yours, edit the following lines, changing the 0.75 to whatever you want:

tsize_fac=0.75

input "Enter the Text Size (or 0 to keep existing). You can also enter a new Arrowhead factor [default = 0.75]... " tsize tsize_facc


INSTRUCTIONS:
a] To change the text size and have the arrowhead size change in relation, using the default arrowhead factor:
    ...When the Input box appears type in the new text size and click OK.
    ...Draw the dimension as normal.

b] To change the text size and the arrowhead factor:
    ...When the Input box appears type in the new text size, press the spacebar and type in the new arrowhead factor, then click OK.
    ...Draw the dimension as normal.

b] To keep the existing text size and change the arrowhead factor:
    ...When the Input box appears type in 0 (zero) for the text size, press the spacebar and type in the new arrowhead factor, then click OK.
    ...Draw the dimension as normal.

In any case, you can abort the macro by clicking Cancel at the Input box. The text size and arrowhead size won't change.


'*****MACRO START*****
'Dim Text-Arrow.d3m
'by Lar, Nassau, Bahamas
'3 June 07
'modified 4 June 07
'Macro to make the arrowhead a factor of the text size...
'Use only when the text size and/or arrowhead factor has to be changed.

'DIMENSION TEXT SIZE FACTOR...
tsize_fac=0.75
tsizee=sys(438) 'default text size in case not changing

input "Enter the Text Size (or 0 to keep existing). You can also enter a new Arrowhead factor [default = 0.75]... " tsize tsize_facc
if sys(999) then end

if tsize_facc<>0 then tsize_fac=tsize_facc

if tsize=0 then tsize=tsizee  'making use of zeros also is a safety feature in case the user enters zero for the text size or arrowhead factor
sys(438)=tsize


>Dimension
{
<Size [tsize]
<ArrowSize [tsize*tsize_fac]
<incomplete
}
'*****MACRO END*****


Lar