Showing results for 
Search instead for 
Do you mean 
Reply

API program to put a CAM object attribute to Part attribute

Hi guys.
I created a post processor that puts the machining time of the selected PROGRAM to the PROGRAM's object attribute. I can see like "MY_TIME=30 mins"
I want to pull the variable and it's value as a PART attribute, I mean being able to see the same variable when I click File-Properties, attributes.
I will then map that attribute to TEAMCENTER's MENCMaching Revision to see the total machining time in Rich Client.

Cem
4 REPLIES

Re: API program to put a CAM object attribute to Part attribute

How does the PP create the attribute (which command)?

 

If you are using a custom DLL, it would be better to let the DLL create the part attribute, which is the easiest.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: API program to put a CAM object attribute to Part attribute

I did it with mom_set_attribute command in the Postbuilder.

Have no experience in programming at all Smiley Happy

Re: API program to put a CAM object attribute to Part attribute

The best would be to have a pre-action DLL or VB script that writes the total machining time to the part attribute before saving the part, this is the most reliable way.

Having a PP run and transferring the attribute from the program group to the part is much more complicated.

 

I think there is an existing ER to be able to use mom_set_attribute for part attributes, so you should ask for being attached to that enhancement request.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: API program to put a CAM object attribute to Part attribute

You can use mom_attr_PART_<name> where <name> is the part attribute name you want to write. Will let you read and write the attribute.