Save attributes changes


public void SetPartNo(Component c)
{
string atrbTitle = "PARTNO";
c.Prototype.OwningPart.SetAttribute(atrbTitle, c.DisplayName);
}

I am running the above code in my 'cycle all components' function to change the attribute values.
The code successfully run and all attributes are changed, but I can't save the changes.
Only the top-most root assembly part is saved when I use File->Save or File->Save all.
It seems like NX didn't detect attribute modification on the children hence no saving is done.

I can set the component to be the work part and it will works, but I wonder is there any better way to achieve this? I am using NX7.5

Please help and thank you.

Are you using the "partial loading" option for your assembly? If so, try turning it off before loading the assembly or load the component part file fully before adding the attribute. I've seen similar, unexpected behavior when operating on a component that is not fully loaded.