Cancel
Showing results for 
Search instead for 
Did you mean: 

Component name changes after running macro

Phenom
Phenom

We switched to NX8.5 this year and back when I was testing it I recall having the problem I'm going to describe and resolving it. But now its come back to bite me again and I can't recall what the solution was.

When I open an assembly part the ANT looks like this:

ANTBefore.jpg

We have a macro (a real macro, not a journal) that makes some small modifications to a CAM object (operation or tool or whatever), it does absolutely nothing regarding assemblies. BUT after executing this macro the ANT now looks like this:

ANTAfter.jpg

You can see that the descriptive name has < and > around it and the component name has underscores ( _ ) around it (the yellow highlight was added by me).

This isn't a problem until the user wants to run an application I wrote that does work with the components. At this point it gets the component names from some attributes and tries to find the instances of these components. Only now the component names have changed it fails to find them.

What the hell is changing the component name and descriptive part name??? And why???

Like I say I'm sure I found some setting or something regarding this a few months back, but I'm damned if I can find anything now.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX8.5.3.3 MP11 64bit] Testing: [NX12.0.0.27 MP1]
3 REPLIES

Re: Component name changes after running macro

Gears Honored Contributor Gears Honored Contributor
Gears Honored Contributor

If Preferences -> assembly -> descriptive file name is set to something other than "file name", you will get the angle brackets around the name.

 

Perhaps the macro is inadvertently changing the file name option.

Re: Component name changes after running macro

Phenom
Phenom
Well, that was it.
I now just have to work out why executing my CAM macro changes this setting!?!?!
Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX8.5.3.3 MP11 64bit] Testing: [NX12.0.0.27 MP1]

Re: Component name changes after running macro

Phenom
Phenom
The header of the macro I was talking about had the descriptive file name setting recorded into it. Not sure how, it just must have been set wrongly when the macro was recorded.
I just deleted that line from the macro and BOOL it worked!

Thanks for pointing me in the right direction @cowski1
Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX8.5.3.3 MP11 64bit] Testing: [NX12.0.0.27 MP1]