Cancel
Showing results for 
Search instead for 
Did you mean: 

NX8.5 Shop Docs Template Customization Tutorial

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

Overview

Documenting the manufacturing plan and the specifics of the NC program are important pieces of the part manufacturing process. This Tech Tip describes the steps to generate shop documentation, then to customize templates to tune the shop docs to your needs.

 

Image12.jpg

 

Created with NX 8.5

 

Details

Follow this tutorial to learn about shop documentation in NX. We will show how:

  1. You can use shop documentation as-is, with out-of-the-box templates. 
  2. You can modify these templates to suit your shop's requirments. 
  3. You can even create new templates from scratch to make your shop documentation fully customized.

 

Output Shop Documentation with an out-of-the-box template

 

Here is what you will do:

  1. Prepare a place for your output
  2. Request Shop Documentation
  3. Specify the type of Shop Doc output
  4. Specify the location of the output
  5. Explore the resulting output

 

1. Prepare a place for your output 

Create a folder named Shop Doc Output on your desktop.

 

2. Request Shop Documentation

In NX, open housing_cover_setup.prt.

In the Program Order View of the Operation Navigator, select 1234.

Click the Shop Documentation icon in the toolbar.

 

3. Specify the type of Shop Doc output

Select Operation List 

Select (HTML/Excel) in the Report Format list.

 

4. Specify the location of the output

  • Click the Browse for an Output File folder.
  • Click the Desktop icon.
  • Double-click the Shop Doc Output folder.
  • Click OK.
  • Click OK in the Shop Documentation dialog to begin processing.

Processing will take a few seconds.

 

  • Click Yes in the Microsoft Office Excel dialog.
  • Close the Information window.

 5. Explore the resulting output

Shop Docs creates an HTML output displayed in Excel. Notice that the title block has been populated with data and a part image. The operation table has cycled for each operation in the selected program.

 

Note: Other platforms (MacOS, Linux) will not display the output automatically.

 

  • Click one of the images in the Path Image column.

 

The image is enlarged and displayed in your default graphic viewer.

 

  • Close the output window.

 

Note: You must always close the current output window before generating the next output or you will receive an error.

 

Further exercises: Repeat the above steps to output a single operation or a group in the Machining Method View. Also, try using other templates in the Report Format list.

 

 

Edit an Existing Template

 

Here’s what you will do:

  1. Make a local copy of the shop_doc folder on your desktop 
  2. Add an Environment Variable that points to it
  3. Edit the Excel file
  4. Update the template
  5. Generate output using the updated template

1. Copy the shop_doc folder to your desktop

  • Go to the \mach\resource\ directory.
  • Copy the shop_doc folder onto your desktop.

This will allow you to edit and save your own templates.

 

2. Add an Environment Variable that points to the shop_doc folder

Add an Environment Variable that tells Shop Docs where to find these files:

  • Start > Control Panel > System and Security > system > Advanced System Settings > Advanced > Environment Variables > New
  • Fill in the following Variable name and Variable value:

Image1.jpg

 

  • Click OK twice.
  • Restart NX so the new environment variable will be applied.

3a. Edit the Excel file

First, you will make a simple text edit to the template and then generate the output to see the edit. Then, you will edit a MOM variable and change the page formatting.

  • On your desktop, open the /shop_doc/excel_templates/folder.
  • Double-click to open shopdoc_template_English_operation_list_select.xlsx
  • In the Excel file, change XXXXX in the title to Die.
  • Do not save the changes.

 

4a. Update the template

8. In Excel, Save As > Save as type: .htm > shopdoc_template_english_operation_list_select.htm >  Republish: Sheet > Save to the /shop_doc/excel_templates/ folder on your desktop.

Note: The following illustration assumes Excel 2007.  Later versions of Excel may vary slightly.

 

 Image2.jpg

5a. Generate output using the updated template

In NX, Select 1234 > Shop Documentation > Operation List Select (HTML/Excel) > OK

 

Notice the output reflects the change you made (XXXX > Die) to the Excel file.

 

Close the output window.

 

3b. Edit the Excel file (again)

Next, you will edit a MOM variable. Sheet 2 contains over 1000 MOM variables with descriptions that are available to customize the template. Filtering by Class, Sorting alphabetically, and Finding key words are useful in navigating this list. For example:

  • Click the mom_vars tab at the bottom of the spreadsheet.
  • Pick Class at the top of column B and select FilterImage5.jpg  in the toolbar.
  • At the top of column B, pick the Image3.jpg  button next to Class and uncheck Image6.jpg Select All.
  • Scroll down and check Image7.jpg Tool.
  • Click OK.
  • Pick the “A” at the top of column A and select Find Image4.jpg  in the toolbar.
  • Type Dia in the Find what field and click Find All.
  • In the Find and Replace window, pick mom_tool_diameter in the Value column.

 

 Image8.jpg

  • Copy the text from column A.

 

Image9.jpg 

 

  • Close the Find and Replace window.
  • Click the shopdoc_template_English tab at the bottom of the spreadsheet.
  • Paste mom_tool_diameter in place of mom_oper_tool (be sure to retain the brackets).

 

Image10.jpg 

 

  • Change Tool Name in the column heading to Tool Dia.
  • Change ### REPEAT TITLE###  to Yes.

 

 Image11.jpg

 

REPEAT TITLE allows you to repeat the title block (defined between ###BODY START### and the ###TABLE START### markers) on each page.

 

  • Do not save changes.

 

4b. Update the template (again)

  • Save As > Save as type: .htm > shopdoc_template_english_operation_list_select.htm > Republish: Sheet > Save to the /shop_doc/excel_templates/ folder on your desktop.

 

5b. Generate output using the updated template (again)

  • In NX, Select 1234 > Shop Documentation > Operation List Select (HTML/Excel) > OK

Notice the title block is repeated on page one and two and that the Tool Dia column now reflects the diameter of each tool.

 

  • Close the output window.

Here is an overview of the types of edits you can make to the template:

 Image12.jpg

 

 

Create a New Template 

 

Here’s what you will do:

  1. Save the edited Excel file under a new name
  2. Create a new template
  3. Create a new .tcl file. This determines which template to process when you select an option in the UI
  4. Edit the .dat file to determine what you see in the user interface and which .tcl file to use
  5. Generate output using the new template

1. Save the edited Excel file

  • In Excel, Save As > File name: my_template.xlsx > Save in the excel_templates folder.

 

Image13.jpg 

2. Create the template

  • In Excel, Save As >  my_template.htm > Republish: Sheet > Save

 

Image14.jpg 

 

You have created two files and the system has created a folder to support the .htm file:

 

Image15.jpg 

 

 

3. Create a new .tcl file

A new .tcl file must be created that uses the same name as the template.

  • In the excel_templates folder, copy and paste shopdoc_template_English_operation_list_select.tcl  
  • Rename it my_template.tcl
  • You have created three files:

 Image17.jpg  

 

 

.xlsx: The Excel file containing your edits on sheet 1 and all available mom variables on sheet 2. This is your working file.
.htm: The template the system uses to create the shop doc output.
.tcl: The .tcl file determines which .htm file to process when you select an option in the UI.

 

4. Edit the.dat file

The shop_doc.dat file determines what appears in the NX user interface and specifies which .tcl file to use.

  • Go back one level to the SHOP_DOC folder.
  • Find shop_doc.dat and remove RO if necessary.
  • Open shop_doc.dat in a text editor.

 

Each line corresponds to an existing template. “#” indicates templates that are commented out and do not appear in the UI.

  • Copy all the text in line 1 and paste it as a new line at the bottom of the list.
  • Replace the existing UI text with what you wish to appear in the UI for your new template, e.g.  My Operation List Select (HTML/Excel)

 

Image18.jpg 

  • Replace the name of the existing .tcl file with the one you just created:  my_template.tcl.

 

Image19.jpg 

 

  • Save and close shop_doc.dat.

 

5. Generate output using the new template

  • In NX, Select 1234 > Shop Documentation > My Operation List Select (HTML/Excel) > OK

 

Do you have a question?

Click 'Add a Comment' below to ask it. (You must be signed in to access this feature.)

 

About the Author

 

Holder.jpg Bill Storrs is in the CAM Product Management Group at Siemens PLM software, Cypress California. His main focus is on CAM usability and learning support. He currently leads the CAM Learning Initiative Team whose mission is to provide users with a comprehensive collection of reference and training materials. He has an M.A. in Corporate Training and Development and has been in the industry for over 20 years.

 

LIVE Tech Tip Webinars
Watch NX experts demonstrate manufacturing best practices. Stay online for Q&A.