You are on page 1of 9

Siemens PLM Software

Easily output the name of the


postprocessor file into shop docs
NX CAM 9: How to use the new MOM_set_attribute variable in the
postprocessor

Answers for industry.


About NX CAM
NXTM CAM software has helped many of the world’s learning manufacturers and job shops produce
better parts faster. You can also achieve similar benefits by making use of the unique advantages NX
CAM offers.

This is one of many hands-on demonstrations designed to introduce you to the powerful capabilities in
NX CAM 9. In order to run this demonstration, you will need access to NX CAM 9.

Visit the NX Manufacturing Forum to learn more, ask questions, and share comments about NX CAM.

2
Hands-on Demonstration: Easily output the name of the postprocessor file
into shop documentation
If the postprocessor has been modified to use the new command MOM_set_attribute, then the program
or operation attributes are automatically added when the operation is postprocessed.

Shop Docs can then output the name of the postprocessor output file (PROGRAM.ptp file) by
customizing the shop doc template using one of these mom variables in the table (this is existing
functionality):

o mom_attr_PROGRAMVIEW_<name> for programs


o mom_attr_OPER_<name> for operations.

Example:
${mom_attr_OPER_POST_OUTPUT_FILE}

output:

Machine Mode Post Output


Mill C:\Users\user name\Desktop\Adding CAM attributes for
shop documentation in the post\
Output\housing_cover_setup.ptp

The new functionality in this project is the ability to edit the postprocessor using MOM_set_attribute so
that the object attributes are automatically created in the part file when the operation or program is
postprocessed. Previously, the user would need to manually type in the object attributes in the part file
and then output the name of the postprocessor output file by customizing the shop doc template using
mom_attr_PROGRAMVIEW_<name> for programs and mom_attr_OPER_<name> for operations.

Do you have a question?


Post your questions or comments at the bottom of this Tech Tip article in the NX Manufacturing Forum.

3
Prerequisites:
1. You will need access to NX CAM 9 in order to run this demonstration.
2. If you haven’t done so already, download and unzip Adding CAM attributes for shop
documentation in the post.7z. You will find the .7z file attached directly to this Tech Tip article in
the NX Manufacturing Forum.

Demo:

Setup
1. Copy the Adding CAM attributes for shop documentation in the post folder to your desktop.

This folder contains the part file, the Shop Doc templates, and the postprocessor you will need for this
demo.

2. Create or edit the UGII_CAM_SHOP_DOC_DIR environment variable so that it points to your


shop_doc folder copy. For example:

Variable Value
UGII_CAM_SHOP_DOC_DIR C:\Users\user name\Desktop\Adding CAM attributes for shop
documentation in the post\shop_doc\

Edit the post processor


3. Choose StartAll ProgramsSiemens NX X.X (X.X being the latest version of
NXManufacturingPost Builder.
4. In the Post Builder, open the mill3ax.pui file. You will find it inside the Post folder in your Adding
CAM attributes for shop documentation in the post folder on your desktop.

4
5. In the Post Builder, edit the custom command PB_CMD_set_oper_attribute.

6. This custom command contains descriptions and a call to MOM_set_attribute.

The command MOM_set_attribute is a new capability defined by this project. Adding this command is
something a postprocessor specialist will do and not something a typical NX end user will do, so we will
not step through the process of how to edit the postprocessor.

7. Cancel the Custom Command dialog box and FileCloseNo, and FileExit the Post Builder.

5
Look at the Operation Attribute
8. Open housing_cover_setup.prt in NX. You will find this part inside your Adding CAM attributes
for shop documentation in the post folder on your desktop.
9. In the Operation Navigator, select CAVITY_MILL and MB3Properties.

Notice that there is only one operation attribute. You will see that a new operation attribute is added
once the operation is postprocessed using the edited postprocessor.

10. Click Cancel.

Post Process

11. Select CAVITY_MILL and MB3Post Process.


12. Click Browse for an Output File and select the \Adding CAM attributes for shop documentation
in the post\Output\ folder on your desktop as the output destination.
13. Click Browse for a Postprocessor and select the mill3ax.pui file in your \Adding CAM attributes
for shop documentation in the post\Post\ folder on your desktop as the postprocessor to use.
14. Click OK in the Postprocess dialog.
15. Close the Information window.

Look at the Operation Attribute


16. In the Operation Navigator, select CAVITY_MILL and MB3Properties.

Notice that the postprocessor has added a new operation attribute. Adding the attribute automatically
when postprocessing is a new behavior defined by this project. Shop Docs uses this operation attribute
to output the name of the postprocessor output file.

17. Click Cancel.

6
Edit the Shop Doc Template
18. Open post_output.xlsx in your \Adding CAM attributes for shop documentation in the
post\shop_doc\excel_templates\ folder. This template has been customized. Notice the
${mom_attr_OPER_POST_OUTPUT_FILE} mom variable has been customized into the table.

Post Output

${mom_attr_OPER_POST_OUTPUT_FILE}

This mom variable will use the operation attribute to output the postprocessor output file name.

Note: This mom variable is intended for use in the table of the template. See additional reference notes
at the end of this demo.

19. Close post_output.xlsx.

Output Shop Docs


20. In the Operation Navigator, select CAVITY_MILL and click Shop Documentation.
21. Select Post Output (HTML/Excel) in the Report Format list.

Remember, the UGII_CAM_SHOP_DOC_DIR environment variable must point to shop_doc folder


inside your Adding CAM attributes for shop documentation in the post folder on your desktop in
order to find the customized template.

22. Click Browse for an Output File and select the \ Adding CAM attributes for shop
documentation in the post \Output\folder on your desktop.
23. Click OK in the Shop documentation dialog.

Notice the name of the post output file appears in the Shop Doc output.

Example:

Machine Mode Post Output


Mill C:\Users\user name\Desktop\Adding CAM attributes for
shop documentation in the post\
Output\housing_cover_setup.ptp

24. Close the part without saving.

Important Note: When you are finished with this demo, delete the Adding CAM attributes for shop
documentation in the post folder from your desktop and delete or disable the environment variable by
typing an X in front of it (i.e. X UGII_CAM_SHOP_DOC_DIR). This is important because if you delete
the camarch9040 Post Output folder from your desktop and do not disable or delete the environment
variable, you will get an error message when you attempt to go into NX Manufacturing. This occurs
because the environment variable points to a nonexistent folder.
7
Reference Notes

1. If you post process a single operation and then create shop doc output for the entire program, then
you will get the post output path in shop docs only for the single operation that was post processed
and the cells for the other (non-post processed operations) will be left blank.
2. If you post process a program, and then create shop doc output for the entire program, then you will
get the post output path displayed for each operation in the program.
3. If you post process different operations with different post processors and then create shop doc
output for the entire program, the appropriate postprocessor output path will be displayed for each
operation as shown in the example below.

While it is possible to use the ${mom_attr_OPER_POST_OUTPUT_FILE} variable in the title section of


the template, the scenario shown above cannot be supported if it is used there. The result will be that
the output includes only the last post output path of those that are processed.

8
Siemens Industry Software
Headquarters
Granite Park One
5800 Granite Parkway
Suite 600
Plano, TX 75024
USA
+1 972 987 3000
Americas
Granite Park One
5800 Granite Parkway
Suite 600
Plano, TX 75024
USA
+1 314 264 8499
Europe
Stephenson House
Sir William Siemens Square
Frimley, Camberley
Surrey, GU16 8QD
+44 (0) 1276 413200
Asia-Pacific
Suites 4301-4302, 43/F
AIA Kowloon Tower, Landmark East
100 How Ming Street
Kwun Tong, Kowloon
Hong Kong
+852 2230 3308

About Siemens PLM Software © 2013 Siemens Product Lifecycle Management


Siemens PLM Software, a business unit of the Software Inc. Siemens and the Siemens logo are registered
Siemens Industry Automation Division, is a leading global trademarks of Siemens AG. D-Cubed, Femap, Geolus,
provider of product lifecycle management (PLM) software GO PLM, I-deas, Insight, JT, NX, Parasolid, Solid Edge,
and services with seven million licensed seats and more than Teamcenter, Tecnomatix and Velocity Series are trademarks
71,000 customers worldwide. Headquartered in Plano, or registered trademarks of Siemens Product Lifecycle
Texas, Siemens PLM Software works collaboratively with Management Software Inc. or its subsidiaries in the United
companies to deliver open solutions that help them turn States and in other countries. All other logos, trademarks,
more ideas into successful products. For more information registered trademarks or service marks used herein are the
on Siemens PLM Software products and services, visit property of their respective holders.
www.siemens.com/plm.
8/13

9
www.siemens.com/plm/nxmanufacturingforum

You might also like