Cancel
Showing results for 
Search instead for 
Did you mean: 

How to read and loop over the object of PartSaveStatus?

Pioneer
Pioneer

Hello Everyone,

 

What is the correct way to read and loop over the PartSaveStatus Class object? I would like to read the details and report it in a custom log file.

 

Thanks,

Shanmugam.K

2 REPLIES
Highlighted

Re: How to read and loop over the object of PartSaveStatus?

Phenom
Phenom

Below is a snippet in C#.

 

static void reportPartSaveStatus(PartSaveStatus status)
    {
        if (status.NumberUnsavedParts == 0) return;

        Echo("  Save Notes:");

        for (int ii = 0; ii < status.NumberUnsavedParts; ii++) 
        {
            NXException ex = NXException.Create(status.GetStatus(ii));
            Echo("  " + status.GetPart(ii) + " - " + ex.Message);
        }
    }
Suresh
Production: NX10.0.3 Developing: NX11.0.2.7, NX12.0.1
Development: C++, C# .Net, VB .Net, KF

Re: How to read and loop over the object of PartSaveStatus?

Pioneer
Pioneer
Thank you, Suresh.
I tried the same thing after posting the message in the community and it seems to be working.