Skip Navigation LinksCreating-a-Custom-NX-Cam-Template


Custom NX CAM Templates 

This is the second NX A to Z article focusing on customizing your NX CAM environment. The first article, Creating Custom NX CAM Configuration Files is somewhat of a required prerequisite for this article, so you should start there if you haven’t read that one yet.

What Are NX CAM Templates

NX CAM template files are just plain old NX CAM files, except that the CAM items are configured to be available as templates. This means that any CAM file you create can be used as a template file. You use NX CAM template files for every CAM item you create within NX, starting with the setup. As soon as you select your NX CAM configuration file, you choose a setup from the list of installed templates. Each CAM template in the CAM Setup selection list has CAM items that are set to be added automatically when the template is selected for a setup. So basically, you choose a configuration file and that sets up the CAM environment as explained in Creating Custom NX CAM Configuration Files, then you choose a setup and that will fill the operation navigator with the items in the template that are set to come in as part of the setup and then you use CAM templates every time you create a CAM object (operation, tool, geometry or method). The figure below shows the CAM configuration and setup selection dialog.

There are a couple different ways that you can create custom CAM template files. You can start with an existing CAM template file and change it or you can create one from scratch. One thing to keep in mind is that if you create a custom CAM template file from scratch, you may have to do some work to update it when a new version of NX is released if the new version has significant changes to the CAM dialogs because these will not automatically update; however, there are ways to update them, so you should be able to bring your custom CAM template forward to the new version.

Configuration Stuff

As with all NX customizations, the idea is to leave the default configuration in place and add your custom stuff on top of it and of course, your customizations should all be on a shared network folder so that everyone in your group can have the same configuration. Custom CAM templates along with all custom CAM files go in the CAM custom directory. Take a look at Creating Custom NX CAM Configuration Files for instructions on how to set up the CAM custom directory. My CAM custom directory is shown below.

The two directories that we are going to focus on are template_set and template_part. The template set directory has text files that list the templates that are associated with a CAM configuration file and the template_part directory has all of the template files. So, the first step in creating a custom CAM template is to create these two directories in you CAM custom directory. Then you need to copy the template set files from the NX CAM Resource directory that you want to customize. I am going to customize the cam_general template set and add a template part to it for a specific machine. So, I copy cam_general.opt from the NX CAM Resource directory, paste it into the template_set directory in my CAM custom directory and then rename it endesin_cam_general.opt as shown below.

Now, in my custom CAM configuration file, I point to my custom CAM template set file that I just created as shown below.

The next step is to add my custom template part to the template set file. As with the CAM configuration files, you can leave all of the defaults the way they are and only change what you want, so in my custom CAM template set file, I leave all the of the default templates and just add my template to the list. If you only want to use your template, then just delete all of the other lines in the file.


Creating the Template Files

So at this point, all of the configuration stuff is done. You have the custom CAM directory, the custom configuration file and the custom template set file. The only thing left to do is create the custom template. I am going to customize an existing template. If you want to create a template from scratch, just create a CAM file like you normally would and then make sure the objects are available as template. I need to copy the mill_contour.prt template part from the template_part directory on the CAM Resource directory and put in the template_part directory in my CAM custom directory (there are english and metric subfolders in both directories). Both directories are shown below.

Now you can open your custom template file and change the CAM objects to suit your needs. Typical changes include:

  • Adding tools to the template that are always in the machine and configuring these tools to load automatically when the template is selected as a setup.
  • The shop documentation templates.
  • Within the methods, you can change the into and outtol and the stock values for the different methods.
  • Adding user defined events to operations or any other CAM objects as needed.
  • Changing the default non-cutting moves.
  • Changing the default feeds and speeds.

Obviously, if you create a custom CAM template file from scratch, then you will probably have done all of these things.

The only extra step required for creating a CAM template as oppose to any other CAM file is to specify the CAM objects be available as templates and specify whether or not they are to be loaded if the template is selected as the setup. This is done right clicking the CAM objects, going to Object and then Template setting. If Object can be Used as Template is checked, then that object will be available from the template, if Create if Parent is Created is checked, then the object will be created automatically if the template is chosen for setup. The menu and dialog are shown below.

That is how to configure and create custom CAM template files. Hope you learned something.

Dave Holland