How to make ROMANS.shx to always be capital?

How to make ROMANS.shx to always be capital?

JohnC_ISM
Collaborator Collaborator
849 Views
6 Replies
Message 1 of 7

How to make ROMANS.shx to always be capital?

JohnC_ISM
Collaborator
Collaborator

just wondering if theres a certain way to change it so this certain text style is always capital? 

0 Likes
Accepted solutions (1)
850 Views
6 Replies
Replies (6)
Message 2 of 7

pendean
Community Legend
Community Legend
Does the available TEXTALLCAPS (System Variable) not work for your needs?
0 Likes
Message 3 of 7

ВeekeeCZ
Consultant
Consultant

I think it can be done with a reactor. When a certain text style is current, it toggles the TEXTALLCAPS on and vice versa.

 

Something like this...

 

(defun c:Reactor-TextStyle-OnLoad () ;; ON
  (if *Reactor-TextStyle-sysvarReactor* (vlr-remove *Reactor-TextStyle-sysvarReactor*))
  (setq *Reactor-TextStyle-sysvarReactor* (vlr-sysvar-reactor nil '((:vlr-sysVarChanged . Reactor-TextStyle-CallBack))))
  )

(defun c:Reactor-TextStyle-UnLoad ()  ;; OFF
  (if *Reactor-TextStyle-sysvarReactor* (vlr-remove *Reactor-TextStyle-sysvarReactor*)) (princ))

(defun Reactor-TextStyle-CallBack (rea lst)
  (if (= (car lst) "TEXTSTYLE")
    (if (wcmatch (getvar 'textstyle) "*ROMANS*")
      (setvar 'textallcaps 1)
      (setvar 'textallcaps 0))))

(c:Reactor-TextStyle-OnLoad)  ; AUTOLOAD

 

0 Likes
Message 4 of 7

JohnC_ISM
Collaborator
Collaborator
Well its only this specific text style we use that needs to always be capital. For details and labels and notes, but then for titles and bigger texts we use the normal first letter capitalized. Just going back and forth between two styles sometimes it just gets annoying having to keep converting to all caps
0 Likes
Message 5 of 7

Kent1Cooper
Consultant
Consultant

It would not be difficult to create another .SHP font file, in which the character definitions of all the lower-case letters are replaced with those of their upper-case equivalents so all letters appear as capitals whether or not typed that way, and leaving all other character definitions alone, and compile that into its .SHX version.  Would that do it for you?

 

If you want it to not have a distinctive name such as [for example] RomansUC, but to still be called just ROMANS, that's possible, BUT:

1)  I'd at least first make copies of the original files with names such as ROMANSorig.shp and ROMANSorig.shx, just in case;

2)  It involves the danger that when you send drawings to others, and parts of yours have been typed as lower-case [but appear as capitals], those parts will revert to lower-case because the others have the standard ROMANS font definition.  That's why I would recommend using a distinctive name instead, and including its .shx file when sending drawings to others.

Kent Cooper, AIA
0 Likes
Message 6 of 7

JohnC_ISM
Collaborator
Collaborator
Yeah that's more along the lines of what I was looking for.
how would I make a new shape file then?
0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

There was a time when AutoCAD came complete with the .SHP [the editable filetype] files of all the fonts that come with it, but no more.  But there's a DUMPSHX.exe thing out there somewhere, with which a few years back I had extracted a ROMANS.shp file to work in, from ROMANS.shx, for another purpose.  So I used that again for this one -- the resulting RomansUC.shp and the compiled .shx version are zipped/attached.

 

It was just a matter of copying the series of character definitions of the capital letters into the place of those of the lower-case letters, and changing one digit in all the copied ones' character numbers to stand for the lower-case characters accordingly.  Lightly tested.

Kent Cooper, AIA
0 Likes