Working with Post Text
“Post text” refers to the collection of strings or labels that Mastercam uses to customize its interface for specific post processors. These include:
- Names and default values for miscellaneous integers and reals.
- Names of drill cycles.
- Names of the individual parameters and settings for each drill cycle.
- Names of custom parameters and settings for each drill cycles.
- Custom integer and real settings for each lathe part-handling operation.
- Custom integer and real settings for each transform operation.
- Names of canned text options.
- Fields and button labels for the Tool parameters page/dialog box.
- Bitmaps used to illustrate individual drill cycles.
Post text entries are organized in sheets under the Text topic in the Control Definition Manager:
Each sheet is organized into different categories, and then individual “cells” within each category:
Post text is encoded in the .pst file as XML data. Each post can have multiple sections of post text. This lets one post support multiple control definitions. Each section is identified by a tag which specifies the type of post and the name of the control definition:
It is important to understand that even though you use the Control Definition Manager to work with post text, Mastercam stores post text in the .pst file, not in the .mcam-control file with the rest of the control definition.
The best practice is to always use the Control Definition Manager to work with and edit post text. Do not use Code Expert or another editor to edit the entries directly in the .pst file. Using the Control Definition Manager ensures that your post text headers are properly created and that the integrity of your post text structure is maintained.
Understanding the format of post text strings
Each cell in a post text sheet can have one of three types of strings. The picture shows you how these appear when you are working in the Text page.
|
Any text string
|
|
|
Empty cell
|
|
|
Pair of double quotes "" with no spaces between them
|
The type of string controls how Mastercam displays the field that is associated with the post text entry.
| Type of string | What Mastercam does |
|---|---|
| Any text string |
If the post text entry contains any text string—even just a single space—the associated data entry field in Mastercam is enabled. In addition:
|
| Empty cell |
If the post text entry is blank, the associated data entry field in Mastercam is enabled. However:
|
|
Pair of double quotes "" |
If the post text entry is a pair of double-quotes, the data entry field in Mastercam is disabled.
|
In Mastercam versions 2017 and earlier, a header key in brackets identifies the post text section of your .pst file. For example, the following header
[CTRL_MILL|GENERIC HAAS VF-TR_SERIES 5X MILL]
indicates that the post text which follows it is for a Mill control definition, where the text is saved in the file Generic Haas VF-TR 5X Mill.pst.
Sections of the post text—individual sheets and categories—are marked by additional headers enclosed by [ ]:
Beginning with Mastercam 2018, all post text sections include a <language> key that corresponds with the Language Culture Name in use on the Mastercam workstation—for example, en-US for United States English, or pt-BR for Brazilian Portuguese. This means that each control definition can include multiple post sections for different languages. When a user selects a machine definition and Mastercam loads the associated post, Mastercam searches the post for a post text section whose <language> key matches the Mastercam workstation, and displays the post text for that language.
You can see the different sections whenever you are asked to select a post text section in Mastercam:
In this example, a single control definition includes post text that has been localized into four target languages: English (US), Chinese, French, and German. All are stored in the same .pst file. In addition, this post includes a section of default entries in US English.
When you select the machine definition and Mastercam loads the associated control definition, it looks for the post text section with the proper <language> key. If Mastercam does not find a section with the proper key, it tries to find the best solution. Mastercam searches for post text in this order:
- A post text section that matches the current control definition name and the Language Culture Name from the Mastercam workstation.
- A
DEFAULTpost text section of proper product type, with the proper Language Culture Name. - An
en-USpost text section. - The first post text section of any language.
- System post text.
If your post contains customized post text entries, your users do not see those entries unless the post text section has a <language> key that matches their workstation.
Note that this can even affect other English-language users if they live in countries other than the United States, since there are different ISO-standard Language Culture Names for other English-speaking countries like Canada, UK, and Australia (among others).
If you have sections of post text with default post text entries, these also have a <language> key. This means that your default post text will not be used or applied as expected unless its <language> key matches your system’s. If you are a post developer or other post distributor, make sure that the default post text sections in your .pst file also have the proper <language> key.
Text for miscellaneous integer and real variables is more complicated because that text can also encapsulate default values. See Post Text for Miscellaneous Values.





