Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to make ROMANS.shx to always be capital?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
JohnC_ISM
464 Views, 6 Replies

How to make ROMANS.shx to always be capital?

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

Tags (3)
Labels (1)
6 REPLIES 6
Message 2 of 7
pendean
in reply to: JohnC_ISM

Does the available TEXTALLCAPS (System Variable) not work for your needs?
Message 3 of 7
ВeekeeCZ
in reply to: JohnC_ISM

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

 

Message 4 of 7
JohnC_ISM
in reply to: pendean

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
Message 5 of 7
Kent1Cooper
in reply to: JohnC_ISM

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
Message 6 of 7
JohnC_ISM
in reply to: Kent1Cooper

Yeah that's more along the lines of what I was looking for.
how would I make a new shape file then?
Message 7 of 7
Kent1Cooper
in reply to: JohnC_ISM

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report