Submitted by wdsunliang on Fri, 05/30/2014 - 09:22
Forums:
I just find an interesting thing.
I record the fitting curve process using c#.
The final part of the code is like below.
.....
NXObject nXObject7;
nXObject7 = fitCurveBuilder1.Commit();
......
If you run the code, you get a fit curve feature in the feature tree.
But unlike other "builder.commit", the result (nXObject7) of this "fitCurveBuilder.Commit" is "null".
Whenever you use this "nXObject7", for example, string a=nXObject7.JournalIdentifier, you will get "System.NullReferenceException: Object reference not set to an instance of an object" error.
Does anyone knows what happens here?
Thank you.
I have tried several
I have tried several situations and all got the same result.
A simple test:
if (fitCurveBuilder1.Commit() == null)
{
lw.WriteLine("aaaaaaaaaaaaa");
}
Then you do get "aaaaaaaaaaaaaa".
But there is a fit curve feature created in the feature tree.
NX_balabalabu
re: fit curve
You may have stumbled upon a bug in the API. I'd suggest sending a small test journal to GTAC so they can look into it.