The post processor application is run from the command line which can be opened by selecting Start - Search -> Command Prompt.
The post processor at minimum takes the path of the post processor configuration script following by the path of the intermediate NC data file. The configuration scripts use the extension .cps which stands for "Customizable Post-processing System".
post config.cps intermediate.cnc
You can specify –help
for getting a list of the available options.
post --help
--help
: Dumps the help.--nobackup
: Disables backup of the original NC output file if it exists.--noeditor
: Specifies that the generated files should not be opened in the editor.--noprogress
: Disables processing progress.--nointeraction
: Disables user interaction during processing.--timeout MINUTES
: Specifies the maximum processing time in minutes before the processing is aborted. The processing does not time out by default.--quiet
: Disables most output to the command prompt.--time
: Enables timing output to the command prompt.--verbose
: Enables more output to the command prompt.--debug
: Enables debug mode.--debugall
: Enables debug mode with output of debugging information to the NC output file.--property NAME VALUE
: Specifies the value of a property.--log PATH
: Specifies the path of the log file. Defaults to the location of the NC output file. Use stdout
and stderr
to write the log to standard output and error, respectively.--locale PATH
: Specifies the path of the locale file.--progress PATH
: Specifies the path of the progress file.--include PATH
: Specifies a search path.--noworkmapping
: Disables automatic mapping of the toolpath motion into the WCS when possible.--machine PATH
: Specifies the path of the machine configuration file.--format ID
: Specifies the format of the intermediate NC file [CNC, APT, NCI]. The format is auto-detected by default.--lang ID
: Specifies the country code for the translation file. Defaults to the country code in the regional settings.--shorten BLOCKS
: Specifies the maximum number of blocks allowed per section. This is used to generate short example NC programs. The NC program cannot be run since they will be incomplete.--encrypt PASSWORD
: Encrypts the given post configuration using the password.--decrypt PASSWORD
: Decrypts the given encrypted post configuration using the password.--interrogate
: Returns the primary information about the given post as JSON. You can add multiple paths by using | as separator of the paths. When multiple posts are interrogated the output will be framed JSON. If no path is given on the command line, the interrogated posts will be read from stdin one line at a time.The NC output path is automatically generated if not specified on the command line. The NC output filename will be set to the same as for the intermediate NC path.
The path of the log can be set using the –log
option. If not set, the path will be set to the path of the NC output file with the extension substituted with "log".
The original NC output file is by default backed up to the file which has the extension substituted with 'bak'. The –nobackup
option can be used to prevent this behavior.
The generated NC output should never be used if the processing has failed. The NC output file will only be generated on successful processing. On failure the generated NC output will be stored in a file which has the extention substituted with 'failed'.
The post processor may write debug information or error messages directly to the NC output file. These messages are all prefixed with an exclamation mark ('!'). An error message is always written to the NC output on processing failure to indicate bad NC data. The NC debug data can be enabled using the –debugall
option.
You can override user-defined as well as built-in properties by specifying the name-value pairs using the –property
option. This allows you to trigger specific post behavior without having to modify the post configuration itself.
The user-defined properties are dumped when running the post processor in verbose mode. The default value as well as the current value are shown. The modified properties are highlighted with an asterix ('*').
post --property programName 100 --property writeTools false config.cps intermediate.cnc
The post processor has built-in support for localization of the configuration script. Arbitrary messages can be translated into a specific language using the localize()
function. When invoked localize()
will lookup the specified message in a translation file (known as locale) which must accompany the configuration script. The path of the translation file is derived from the path of the configuration script by substituting the extension with the country code specified by the –lang
option and adding '.lang'. For instance, if the path of the configuration script is 'C:\posts\genericiso.cps' and the language id is 'de' then the translation file path will be 'C:\posts\genericiso.de.lang'. The post processor will also try to load the translation file 'common.?.lang' (where ? is substituted with the country code). This allows several post configurations to be translated using a single translation file.
The post processor will try to open the log and NC output files automatically in the preferred editor when the post processing has completed. The path of the preferred editor is specified in the Windows Registry under "Software\Autodesk\Autodesk\Post Processor\editor" (string type). The entry is valid for both the personal and machine Registry with the personal setting taking priority.
The post processor will try to open the generated files in the included NC editor by default (see http://cam.autodesk.com).
The post processor will returns different exit codes dependent on the kind of failure.
setExitCode()
function.