UpdatePost Add-In
Use the UpdatePost Add-In to update posts from earlier versions of Mastercam so that they run with the current version.
- For detailed information about posts and updating them, contact your Mastercam Reseller.
-
Beginning in Mastercam 2018, post text can be localized to other languages. (Post text refers to strings stored in the post that are used to customize drill cycle names, miscellaneous values, and other elements in the Mastercam interface.) When you update a post from Mastercam 2017 or earlier, Mastercam adds the Language-Culture code for your workstation to your post.
For example, if a user in Germany runs UpdatePost, Mastercam adds the
de-DEcode to the post. If a user whose workstation is localized to a different country or region uses the post, Mastercam displays default text strings instead of the strings that are saved in the post.
Organize the Posts to Update
After you run UpdatePost, the updated post keeps the original file name, and the original post is renamed with a backup extension (for example, Postname.pst_version). You may wish to copy your original posts to a temporary folder or to your Mastercam posts folder before running UpdatePost.
UpdatePost does not update posts that are older than Mastercam X. If you need to update an older post, please contact your Mastercam Reseller.
Start UpdatePost
From the Home tab, choose Run Add-In, and select UpdatePost.dll.
Set the UpdatePost Options
Click the File cabinet button to choose the posts to be updated. Use [Shift+click] and [Ctrl+click] to select multiple posts.
- If the posts to be updated are binned, select only the .pst file. However, the matching .psb file must be in the same folder.
- Some posts are password-protected and cannot be updated with UpdatePost except on machines with authorized SIMs.
Specify the target directory for the updated posts. By default, Mastercam writes the updated posts to the \Posts folder for each product type in the current Mastercam installation. To write it to a different location, click the folder selection button and select a different folder.
Convert the Posts
Review the log file for errors and other notes.
It is important to understand that if UpdatePost encounters any errors, the conversion process does not stop, but continues to its end. All errors (as well as any instances where Mastercam could not determine what to do) are written to the log file and flagged in the converted post. You should review these and make the necessary corrections to ensure that the updated post contains no critical errors.
If you want to refer to the log later, make sure that you print it out or save a copy to a different file. Mastercam overwrites the log each time you run UpdatePost.
- Click OK to convert the posts and close UpdatePost.
- Click Apply to convert the posts and leave UpdatePost open so you can convert more posts.
Review the Log File
Review the log file for errors and other notes.
It is important to understand that if UpdatePost encounters any errors, the conversion process does not stop, but continues to its end. All errors (as well as any instances where Mastercam could not determine what to do) are written to the log file and flagged in the converted post. You should review these and make the necessary corrections to ensure that the updated post contains no critical errors.
If you want to refer to the log later, make sure that you print it out or save a copy to a different file. Mastercam overwrites the log each time you run UpdatePost.
The UpdatePost utility also converts setup sheets (.set files) to the current Mastercam format. Follow the same procedure as for posts, with these guidelines:
- After clicking Select Post(s), select Post Setup Sheet Files (*.set) from the Files of type list.
The UpdatePost utility incorporates several features that make it easy to identify and fix errors and areas of concern in the converted post. Because of the great variety in techniques used to customize Mastercam posts, it is impossible for UpdatePost to predict with 100% accuracy the intent of the post writer. You need to be concerned about two types of situations:
- It was not possible for UpdatePost to reliably convert a line or object in a way that conforms to Mastercam standards, and results in an error condition.
- There were several possible Mastercam conversion solutions, and UpdatePost was not sure which to use. The converted post will work, but might not produce the output that you expect.
The most important tool in evaluating the conversion results is the UpdatePost log. Mastercam writes UPDATEPOST.LOG to the destination directory where you are saving the converted posts. The UpdatePost utility overwrites the log each time you run the utility and save posts to the same directory.
Log File Error Example
In the log file, an error looks like this:
29 - 08 Jan 2010 04:08:52 PM - PST LINE (572) - Label has not been defined[*28]
The LINE
(#) block tells you the location of the error in the converted
post; in this case, line 572.
When you open the converted post, Mastercam displays the affected code as a block of three lines:
- The first line is the actual line of code created by UpdatePost
- The second line is the original line,
commented out, and preceded by the phrase
CNC<<CONVERT>> - The third line reproduces the error
message from the log, formatted as a comment, and preceded by
the phrase
CNC<<MSG ... >>
The following code shows a typical conversion error; in this example. In this example, Mastercam knows that the line is supposed to be an else command, but it cannot convert the other word because it has not been properly defined:
else, #'nobrk' emulation option #CNC<<CONVERT>> else, p_nobrk_emul #'nobrk' emulation option #CNC<<MSG-ERROR(572)>> Label has not been defined[*28]
There is a one-to-one correspondence between messages embedded in your code and messages in the log file. Before using a converted post, you should always review the log and the corresponding message in the post and make any necessary corrections.
Uncertain variable type error
When UpdatePost expects
a variable to be a string but it finds a real, or vice versa, it inserts
a question mark in the code following the variable name. It inserts
a single question mark ? when it expects
a real variable, and a double question mark ??
when it expects a string variable.
Because UpdatePost cannot properly process the expression which contains the variable, these lines will not produce the output that you intend. Review and correct each instance before running the post.
Post processor filename(s)
Click the File cabinet button to select the posts to be converted. You can select several posts to convert them in a batch. Multiple posts can be from different source folders.
- Use [Shift+click] to select a range of posts.
- Use [Ctrl+click] to select individual posts in the same folder.
Target directory
This is where Mastercam saves the converted posts. Click Browse to select a different folder.
Change target folder based on post type
If you select this option, Mastercam automatically saves the updated posts to the default posts folder for each Mastercam product.
Overwrite mode
Tell Mastercam if you want to know when a post with the converted name already exists:
- (Verbose) Prompt user: Mastercam informs you whenever a file already exists. You can decide whether or not to overwrite it.
- (Silent) Do not overwrite: Mastercam does not overwrite an existing file and does not inform you when this happens. However, it is still written to the log so you can review it after the job has completed.
- (Silent) Overwrite all: Mastercam overwrites any existing files without informing you. However, the file is still written to the log so you can review it after the job has completed.
View log file
Opens the log file in your default text editor.
Mastercam writes the log file to the target folder. It is overwritten each time you run a conversion job to this folder. However, if you update posts by clicking the Apply button, Mastercam appends the log for new posts to the existing log.
Clear log file
Deletes the contents of the current log file. Do this if you are converting several posts in the same session and want to preserve separate log files for each post.





