During the post execution I'm building a Tool Code based on the various tool parameters. (For example a 1/2" endmill would yield something like EM-0-5000, etc.) I'd like to write the resulting Tool Code value back to the Description field in the Tool dialog box if at all possible. Could I use something like ug_setAttrValue_ to do this? I think this would be preferred since I could then capture the code in the Tool Library.
If I can't write the value back to the Description Field, can I programatically add a tool attribute and write a value to it using mom_attr_TOOL_? I've tried this using
set mom_attr_TOOL_CODE $tool_code
but I don't get a value to populate the attribute?
Solved! Go to Solution.
To modify the description field of the NX tool object, you need to use the API.
You can however define an attribute for your own description. This command sets attributes on CAM objects from the postprocessor:
MOM_set_attribute <object_name> <attribute_title> <attribute information array>.
There are examples in the help of using this in shop docs or post builder to save the name ot thepostprocessor output file with the Program Group, but it is a general function and can assign any attribute to any CAM object in the Operation Navigator.
What version of NX was this added in?
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
Thanks for the info. Forgive me, I'm new to NX and I'm having trouble finding information on the MOM_set_attribute command in the documentation. I was able to use the command to create an attribute in the Tool Properties but unable to assign the attribute a value. I don't think I have the proper syntax for the <attribute information array>. Do you have a piece of sample code to share? Thanks!
Can you only use the MOM_set_attribute command to write attributes to the operation object? I tried writing an attribute to the Tool object but got an error?
See the NX 9.0 help file under topic What's new in NX 9.0 => CAM => NX Post => Adding CAM attributes for shop documentation in the post.
It seems that only program groups and operations are supported.
To add more supported objects, you would have to file an enhancement request at GTAC.
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0
Employees of the customers, together we are strong
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide