Special Offer
Reverse Code Generator

Utility, written in 1995, that attempts to convert standard NC G&M code back into SmartCAM geometry. Utility can be integrated into SmartCAM or run stand-alone. Uses a PC version of the UNIX AWK language to parse your NC code file and convert the cutter path back into SmartCAM geometry. Utility creates a SmartCAM macro, which when run builds the geometry.

The reverse code generator is written to handle milling-style G-code.

SmartCAMcnc makes no guarantees of the function or accuracy of, nor provides support for this freeware utility.


These instructions give a brief explaination of how the reverse code generator might be setup. Please read the README.TXT in the zip archive for more information. Additionally, the path information shown is for older versions of SmartCAM, your paths will be different.

  1. Create a directory, under your SmartCAM User files folder, called revgen.

    mkdir C:\sm9\revgen

  2. Copy the revnt40.zip file to this empty directory.

    copy revnt40.zip C:\sm9\revgen

  3. Unzip revnt40.zip into this folder.

    pkunzip revnt40.zip

  4. This utility by default assumes that smartcam is installed in C:\sm9. If you have smartcam located on a different drive, other than C:, or you are loading revgen in a different path, other than C:\sm9\revgen, you need to edit revgen.mcl and revgen.pcb to reflect these changes.

    To edit the revgen.pcb, Startup Visual CTK and read in revgen.pcb. Then go under Resource/Properies and change the macro path to the correct location for revgen.mcl.

  5. Edit the PMILL.INI (Production Milling), AMILL.INI (Advance 3d), or FFM.INI (FreeForm) in a text editor. Find the [PcbPaths] section and add options=C:\sm9\revgen\revgen.pcb. For an Example, the PcbPaths section may look like the following:


Note: options should reflect the correct path to the revgen.pcb. If you have loaded revgen in a path other than C:\sm9\revgen be sure options are set to the correct path.

The Reverse Code Generator can be found here:
RevGen40.zip - 1.5 Mb