You are on page 1of 6

Volume 1 Chapter 6 Using the Post Text File

6 Using the Post Text File

Overview
The post text file allows the post to customize the text prompts on dialog boxes and the menus in
Mastercam. The main use of the post text file is to customize the Miscellaneous Values parameter page
, the Drill Cycle parameter pages and the Canned Text dialog for the specific options the post
customization file offers the user.

Each post customization file (.PST file) has an associated post text file (.TXT file). When a post
customization file is loaded, Mastercam automatically searches for a file with the same name as the
.PST, but with the .TXT filename extension. The post text file must reside in the same directory as the
post customization file.

MILL9.TXT
Note: This explanation deals with Mastercam Mill, but the same logic applies to Mastercam
Lathe, Wire, and Router.
All the text used in the menus and dialog screens in Mastercam Mill is stored in the MILL9.TXT file,
which is located in the same directory as the MILL9.EXE executable file (usually the C:\MCAM9
directory or similar). When Mastercam MILL is started, it reads the MILL9.TXT file. When a post text
file is loaded, any text items the post.TXT file contains overlay those items in the original MILL9.TXT.

Example post text file modifications


Customizing the Miscellaneous Values dialog box
A post text file looks something like the following:
(See the MPLFAN.TXT file for the default MPFAN.PST for reference.)

[post processor] Text section header ID


menu 1 {
"Post processor:",
"&Change", Menu ID
"&Run",
"",
Menu Items
"",
"",
"",
"Run&old*",
"", Menu end marker
"",
""}

June 2002 Mastercam Version 9 MP Post Processor Reference Guide 6-1


Chapter 6 Using the Post Text File Volume 1

[canned text]
1. "Stop" Text section header ID
2. "Ostop"
3. "Bld on"
4. "bLd off" Custom text prompts
5. "M5"
6. "M6"
7. "M7"
8. "M8"
9. "M9"
10. "M10"

[misc reals]
1. "Misc. real [1]"
2. "Misc. real [2]"
3. "Misc. real [3]"
4. "Misc. real [4]"
5. "Misc. real [5]"
6. "Misc. real [6]"
7. "Misc. real [7]"
8. "Misc. real [8]"
9. "Misc. real [9]"
10. "Misc. real [10]" Custom text prompts

[misc integers]
1. "Work Coordinates [0-1=G92, 2=G54's]"
2. "Absolute/Incremental, top level [0=ABS, 1=INC]"
3. "Reference Return [0=G28, 1=G30]"
4. "Misc. integer [4]"
5. "Misc. integer [5]"
6. "Misc. integer [6]"
7. "Misc. integer [7]"
8. "Misc. integer [8]"
9. "Misc. integer [9]"
10. "Misc. integer [10]"

[simple drill]
1. "Drill/Counterbore"
2. "Feed rate"
3. "Dwell"
4. "Clearance..."
5. "Retract..."
6. "Depth..."
7. ""
8. ""
9. ""
10. ""
11. ""

[peck drill]
1. "Peck drill"
2. "Feed rate"
3. "Dwell"
4. "Clearance..."
5. "Retract..."
6. "Depth..."
7. "1st peck"
8. "Subsequent peck"
9. "Peck clearance"
10. ""
6-2 Mastercam Version 9 MP Post Processor Reference Guide June 2002
Volume 1 Chapter 6 Using the Post Text File
11. ""

… remainder of post text file not shown…

Replace the standard text in the [misc integers] section:


1. "Misc. integer [1]"
2. "Misc. integer [2]"
3. "Misc. integer [3]"

with the following post processor specific prompts:


1. "Work Coordinates [0-1=G92, 2=G54's]"
2. "Absolute/Incremental, top level [0=ABS, 1=INC]"
3. "Reference Return [0=G28, 1=G30]"

Note: The text must be enclosed with double quotes ( " ").
If you wish to ‘gray-out’ an input field on a parameter screen to disable it, replace all the text on the
line with just a pair of double quotes ( " "). with nothing between them.
This change would change the Miscellaneous Values dialog box to look like the following illustration:
Custom text from post text file

These custom prompts allow the user to know what options the post has and what values to enter to use
the options. In the post customization file, the values are accessed using the miscellaneous integers
variables (mi1 – m10) and the miscellaneous real variables (mr1 – mr10).

See Volume 3, The NCI File and Volume 3, Numeric Variables for details about these post variables.

June 2002 Mastercam Version 9 MP Post Processor Reference Guide 6-3


Chapter 6 Using the Post Text File Volume 1

Customizing the Drill Cycle parameters dialog box


To demonstrate altering the Drill Cycle parameter dialog box by changing the usual prompts and
button labels that Mastercam displays, we added numbered markers (<number>) to the post text file for
the Peck Drill cycle:
Post text file entry Post variable for each item
[peck drill]
1. "<1>Peck drill" drillcyc
2. "<2>Feed rate" fr
3. "<3>Dwell" dwell
4. "<4>Clearance..." initht
5. "<5>Retract..." refht
6. "<6>Depth..." depth (z)
7. "<7>1st peck" peck1
8. "<8>Subsequent peck" peck2
9. "<9>Peck clearance" peckclr
10. "<10>Retract amount" retr
11. "<11>Shift" shift

Each text line in the post text file appears in the Drill Cycle parameters dialog box as shown below:

Drill Cycle Descriptions Custom Drill Parameters

Note: Item "<2>Feedrate" does not appear in this dialog box, it is on the Tool Parameters page.

6-4 Mastercam Version 9 MP Post Processor Reference Guide June 2002


Volume 1 Chapter 6 Using the Post Text File

Also notice that in the Cycle type selection list, “<1>Peck drill” has been changed by the post text file,
but the "Peck drill – full retract" tab at the top to the screen has not changed. These Cycle Descriptions
are controlled by altering the [drill cycle descriptions] section of the post text file:
[drill cycle descriptions]
1. “Simple drill - no peck"
2. "Peck drill - full retract"
3. "Chip break - incremental retract"
4. "Tapping - feed in, reverse spindle - feed out"
5. "Boring #1 - feed out"
6. "Boring #2 - stop spindle - rapid out"
7. "Misc #1 Drill"
8. "Misc #2 Drill"
9. "Custom drill cycle #9"
10. "Custom drill cycle #10"
11. "Custom drill cycle #11"
12. "Custom drill cycle #12"
13. "Custom drill cycle #13"
14. "Custom drill cycle #14"
15. "Custom drill cycle #15"
16. "Custom drill cycle #16"
17. "Custom drill cycle #17"
18. "Custom drill cycle #18"
19. "Custom drill cycle #19"
20. "Custom drill cycle #20"

Each of the Drill Cycles has each own list of text items as shown above.

Each cycle also can use the Custom Drill Parameters page to access an additional ten numeric variables
if needed.

Post text file entry Post variable for each item


[drill custom param 2]
1. "2-Drill parameter #1" drl_prm1
2. "2-Drill parameter #2" drl_prm2
3. "2-Drill parameter #3" drl_prm3
4. "2-Drill parameter #4" drl_prm3
5. "2-Drill parameter #5" drl_prm5
6. "2-Drill parameter #6" drl_prm6
7. "2-Drill parameter #7" drl_prm7
8. "2-Drill parameter #8" drl_prm9
9. "2-Drill parameter #9" drl_prm9
10. "2-Drill parameter #10" drl_prm10
11. "Custom Drill Parameters 2"

Note: The 11th item in each [Custom Drill Parameters] list is the text to display on the dialog box tab
that is used to select the Custom Drill Parameters page.
See Volume 3, The NCI File and Volume 3, Numeric Variables for details about these post variables.

June 2002 Mastercam Version 9 MP Post Processor Reference Guide 6-5


Chapter 6 Using the Post Text File Volume 1

Customizing the Canned Text dialog box


Another common use of the post text file is to customize the Canned Text screen for any post
customization file specific options the post writer has added.

Post text file entry Post variable for each item


[canned text]
1. "Stop" cant_pos1 & cant_val1
2. "Ostop" cant_pos2 & cant_val2
3. "Bld on" cant_pos3 & cant_val3
4. "bLd off" cant_pos4 & cant_val4
5. "M5" cant_pos5 & cant_val5
6. "M6" cant_pos6 & cant_val6
7. "M7" cant_pos7 & cant_val7
8. "M8" cant_pos8 & cant_val8
9. "M9" cant_pos9 & cant_val9
10. "canned text #10" cant_pos10 & cant_val10

See Volume 3, The NCI File and Working with Cantext for details about these post variables.

Additional customization
This document describes some of the most common uses of the post text file, although other
customizations of Mastercam’s menus and text prompts are possible by using a post .TXT file. To find
what to add to your post text file, you should note the text and location of that text in Mastercam that
you wish to alter, then load MILL9.TXT (or LATHE9.TXT, WIRE9.TXT) into a text editor and do a
search on that text string. Copy that section from the MILL9.TXT and paste it into your post text file.
You can then alter the specific text in the post text file, (do not alter the main MILL9.TXT file), start
Mastercam, and see if your changes took effect.
Note: If you edit and save the post .TXT file while Mastercam is running then switch back to
Mastercam, your changes will not appear until you either restart Mastercam or change to a different
post processor and then change back to your post processor. Mastercam only reads the post .TXT file
when a post customization (.PST) file is loaded.

6-6 Mastercam Version 9 MP Post Processor Reference Guide June 2002

You might also like