View Full Version : script help
mark.momper
2008-02-22, 06:10 PM
I'm trying to modify a script for setting text and dimension styles that i got from a previous employer. I wanted to change the font to country blueprint. Every time that I try to change the font the script ceases to work.
one problem that i'm experiencing is that it has trouble distinguishing between shx and ttf fonts. the script my former workplace used just stated the name and didn't include extension (i think it defaults to shx) but I've tried to get it to work with country blueprint, but it doesn't seem to understand that it's ttf. If anyone has the shx font of country blueprint could they send it to me?
Here's the other problem. When I change the font listed the script messes up. I'm not sure what all the returns (hitting enter) are for unless that resorts to default of question?
Original script: (IGNORE ****** just trying to encapsulate the script to clear up confusion)
****************
-STYLE
PS-TEXT
HAND1
.09
PS-HEADERS
OR-LD
.1875
PS-TITLES
OR-LD
.25
MS-1-HEADERS
OR-LD
.1875
MS-1-TEXT
HAND1
.09
DIM
DIMALT
OFF
DIMALTD
2
DIMALTF
25.4000
DIMALTTD
2
DIMALTTZ
0
DIMALTU
2
DIMALTZ
0
DIMAPOST
.
DIMASO
ON
DIMASZ
0
DIMAUNIT
0
DIMBLK
.
DIMBLK1
.
DIMBLK2
.
DIMCEN
.05
DIMCLRD
BYLAYER
DIMCLRE
BYLAYER
DIMCLRT
7
DIMDEC
3
DIMDLE
.05
DIMDLI
.375
DIMEXE
.05
DIMEXO
.05
DIMFIT
5
DIMGAP
.025
DIMLFAC
1
DIMLIM
OFF
DIMPOST
.
DIMRND
0
DIMSAH
OFF
DIMSCALE
1
DIMSD1
OFF
DIMSD2
OFF
DIMSE1
OFF
DIMSE2
OFF
DIMSHO
ON
DIMSOXD
OFF
DIMTAD
0
DIMTDEC
3
DIMTFAC
1
DIMTIH
OFF
DIMTIX
ON
DIMTM
0
DIMTOFL
ON
DIMTOH
OFF
DIMTOL
OFF
DIMTOLJ
1
DIMTP
0
DIMTSZ
.041666
DIMTVP
.8333
DIMTXSTY
MS-1-TEXT
DIMTXT
.09
DIMTZIN
0
DIMUNIT
6
DIMUPT
OFF
DIMZIN
3
SAVE
ARCH-DIM-1
DIMASZ
.15
DIMCLRT
BYLAYER
DIMFIT
5
DIMGAP
.05
DIMTSZ
0
DIMTVP
0
DIMUNIT
6
SAVE
ARCH-LEA-1
RESTORE
ARCH-DIM-1
EXIT
*******************
splitting to 2 replies because the message gets far too long with the output
mark.momper
2008-02-22, 06:21 PM
I replace the font "hand1" with "romans" (for sake of argument since i cant get ttf fonts to work yet) and it produces this output
**************
Command: SCRIPT
Command: -STYLE
Enter name of text style or [?] <Standard>: PS-TEXT
New style.
Specify full font name or font filename (TTF or SHX) <txt>: romans
Specify height of text or [Annotative] <0.0000>: .09
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
Vertical? [Yes/No] <No>:
"PS-TEXT" is now the current text style.
Command: PS-HEADERS
Unknown command "PS-HEADERS". Press F1 for help.
**************
ANY IDEAS???? i'm clueless. for some reason the first script moves to the next -style command without typing it.
I tried modifying the second string of commands as follows(added second -style command):
-STYLE
PS-TEXT
romans
.09
-style
PS-HEADERS
OR-LD
.1875
Output:
*******************
Command: script
Command: -STYLE
Enter name of text style or [?] <PS-TEXT>: PS-TEXT
Existing style.
Specify full font name or font filename (TTF or SHX) <romans.shx>: romans
Specify height of text or [Annotative] <0.0900>: .09
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
Vertical? [Yes/No] <No>:
"PS-TEXT" is now the current text style.
Command: -style
Enter name of text style or [?] <PS-TEXT>: PS-HEADERS
New style.
Specify full font name or font filename (TTF or SHX) <txt>: OR-LD
Specify height of text or [Annotative] <0.0000>: .1875
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
Vertical? [Yes/No] <No>:
"PS-HEADERS" is now the current text style.
Command:
-STYLE Enter name of text style or [?] <PS-HEADERS>: PS-TITLES
New style.
Specify full font name or font filename (TTF or SHX) <txt>: OR-LD
Specify height of text or [Annotative] <0.0000>: .25
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
Vertical? [Yes/No] <No>:
"PS-TITLES" is now the current text style.
Command:
-STYLE Enter name of text style or [?] <PS-TITLES>: MS-1-HEADERS
New style.
Specify full font name or font filename (TTF or SHX) <txt>: OR-LD
Specify height of text or [Annotative] <0.0000>: .1875
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
Vertical? [Yes/No] <No>:
"MS-1-HEADERS" is now the current text style.
Command:
-STYLE Enter name of text style or [?] <MS-1-HEADERS>: MS-1-TEXT
New style.
Specify full font name or font filename (TTF or SHX) <txt>: romans
Specify height of text or [Annotative] <0.0000>: .09
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
Vertical? [Yes/No] <No>: DIM
Yes or No, please.
*********************
so by adding -style again the script hiccups and stops dead in its tracks. you have to hit return and it doesn't continue through to the next text style and subsequent dim styles
I'm trying to modify a script for setting text and dimension styles that i got from a previous employer. I wanted to change the font to country blueprint. Every time that I try to change the font the script ceases to work.
one problem that i'm experiencing is that it has trouble distinguishing between shx and ttf fonts. the script my former workplace used just stated the name and didn't include extension (i think it defaults to shx) but I've tried to get it to work with country blueprint, but it doesn't seem to understand that it's ttf. If anyone has the shx font of country blueprint could they send it to me?......
The file name for Country Blueprint.TTF is "counb___.ttf"
This is the script you want (edit it and add more names as needed)
-style
PS-TEXT
counb___.ttf
-style
PS-HEADERS
counb___.ttf
-style
PS-TITLES
counb___.ttf
-style
MS-1-HEADERS
counb___.ttf
Note, there are (5) five <enters> between commands "entering" thought the defaults, if you need other than the defaults, you would edit accordingly. Also, to "finish" the script you need one more <enter> at the end (= 6 enters)
Hope it helps
mark.momper
2008-02-22, 08:16 PM
what would i do if i wanted to keep the dimension script on the end?
when i edited the script to match yours i got this output
Command: script
Command: -style
Enter name of text style or [?] <Standard>: PS-TEXT
New style.
Specify full font name or font filename (TTF or SHX) <txt>: counb___.ttf
Specify height of text or [Annotative] <0.0000>:
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
"PS-TEXT" is now the current text style.
Command: -style
Enter name of text style or [?] <PS-TEXT>: PS-HEADERS
New style.
Specify full font name or font filename (TTF or SHX) <txt>: counb___.ttf
Specify height of text or [Annotative] <0.0000>:
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
"PS-HEADERS" is now the current text style.
Command: -style
Enter name of text style or [?] <PS-HEADERS>: PS-TITLES
New style.
Specify full font name or font filename (TTF or SHX) <txt>: counb___.ttf
Specify height of text or [Annotative] <0.0000>:
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>:
"PS-TITLES" is now the current text style.
Command: -style
Enter name of text style or [?] <PS-TITLES>: MS-1-HEADERS
New style.
Specify full font name or font filename (TTF or SHX) <txt>: counb___.ttf
Specify height of text or [Annotative] <0.0000>:
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>: DIM
Yes or No, please.
do i just need more enters?
what would i do if i wanted to keep the dimension script on the end?
when i edited the script to match yours i got this output
....
Command: -style
Enter name of text style or [?] <PS-TITLES>: MS-1-HEADERS
New style.
Specify full font name or font filename (TTF or SHX) <txt>: counb___.ttf
Specify height of text or [Annotative] <0.0000>:
Specify width factor <1.0000>:
Specify obliquing angle <0>:
Display text backwards? [Yes/No] <No>:
Display text upside-down? [Yes/No] <No>: DIM
Yes or No, please.
do i just need more enters?
Yes, you add an <enter> after Display text upside-down? [Yes/No] <No>:
Are you adding a text style named "DIM"?
Basically just keep repeating the pattern as you add different style names with (5) enters between them and simply add one more enter at the end of the script.
mark.momper
2008-02-22, 08:35 PM
Yes, you add an <enter> after Display text upside-down? [Yes/No] <No>:
Are you adding a text style named "DIM"?
Basically just keep repeating the pattern as you add different style names with (5) enters between them and simply add one more enter at the end of the script.
The script as it used to work actually created dimension styles and leaders for each scale. I have the same script written for most architectural scales.
so it's not a text style per se
the unmodified script still functions perfectly, i just don't have the font to use anymore so i had to use one that i possess.
Dim is just the command that starts the next string. i guess i can separate them into two separate scripts if necessary, but it's nice to have one script that gives you all the text used in a given scale as well as the dimensions and leader styles.
mark.momper
2008-02-22, 08:42 PM
I just tried adding 6 <enter> between the end of the text script and the dim script and now it is trying to repeat the "-style" command
apparently because enter again defaults to repeating a command.
but with only 5, I get asked "Vertical? [Yes/No] <No>: -style
Yes or No, please."
The script as it used to work actually created dimension styles and leaders for each scale. I have the same script written for most architectural scales.
so it's not a text style per se
the unmodified script still functions perfectly, i just don't have the font to use anymore so i had to use one that i possess
Dim is just the command that starts the next string. i guess i can separate them into two separate scripts if necessary, but it's nice to have one script that gives you all the text used in a given scale as well as the dimensions and leader styles.
Are you saying you have a full script that works but you just need to change the font to Country Blueprint? You could use "find and replace" from <your old font> to "counb___.ttf"
Or if you use the one you're working on, just make sure you add the <enter> to finish the -style routines and go into the dim routine.
You could
I just tried adding 6 <enter> between the end of the text script and the dim script and now it is trying to repeat the "-style" command
apparently because enter again defaults to repeating a command.
If you're adding the "DIM" routine to the end, keep only 5 enters.
mark.momper
2008-02-22, 08:48 PM
tedg, thanks for all the help. i guess i understand it a bit better.
for some reason when i was replacing the old font i must have eliminated an <enter>
when i did "find and replace" it worked fine.
Thanks for all the help.
if anyone wants the script here's the working version for one of the scales. you just would have to edit it to match your preferences for tics and font, size etc. it's set in inches default
-STYLE
PS-TEXT
counb___.ttf
.09
PS-HEADERS
OR-LD
.1875
MS-2-TITLES
OR-LD
.5
MS-2-HEADERS
OR-LD
.375
MS-2-TEXT
counb___.ttf
.18
DIM
DIMALT
OFF
DIMALTD
2
DIMALTF
25.4000
DIMALTTD
2
DIMALTTZ
0
DIMALTU
2
DIMALTZ
0
DIMAPOST
.
DIMASO
ON
DIMASZ
0
DIMAUNIT
0
DIMBLK
.
DIMBLK1
.
DIMBLK2
.
DIMCEN
.05
DIMCLRD
BYLAYER
DIMCLRE
BYLAYER
DIMCLRT
7
DIMDEC
3
DIMDLE
.05
DIMDLI
.375
DIMEXE
.05
DIMEXO
.05
DIMFIT
5
DIMGAP
.025
DIMLFAC
1
DIMLIM
OFF
DIMPOST
.
DIMRND
0
DIMSAH
OFF
DIMSCALE
2
DIMSD1
OFF
DIMSD2
OFF
DIMSE1
OFF
DIMSE2
OFF
DIMSHO
ON
DIMSOXD
OFF
DIMTAD
0
DIMTDEC
3
DIMTFAC
1
DIMTIH
OFF
DIMTIX
ON
DIMTM
0
DIMTOFL
ON
DIMTOH
OFF
DIMTOL
OFF
DIMTOLJ
1
DIMTP
0
DIMTSZ
.041666
DIMTVP
.8333
DIMTXSTY
MS-2-TEXT
DIMTXT
.09
DIMTZIN
0
DIMUNIT
6
DIMUPT
OFF
DIMZIN
3
SAVE
ARCH-DIM-2
DIMASZ
.15
DIMCLRT
BYLAYER
DIMFIT
5
DIMGAP
.05
DIMTSZ
0
DIMTVP
0
DIMUNIT
6
SAVE
ARCH-LEA-2
RESTORE
ARCH-DIM-2
EXIT
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.