NXOpen-FitCurve
NXOpen-FitCurve
(OP)
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 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.





RE: NXOpen-FitCurve
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.
RE: NXOpen-FitCurve
RE: NXOpen-FitCurve
Thank you.
I have tried it, but the feature you get from "fitCurveBuilder.CommitFeature()" is still "null".
I never met this kind of problem before.
RE: NXOpen-FitCurve
www.nxjournaling.com
RE: NXOpen-FitCurve
After the fitcurve has been created you can get the feature like this
Dim fitcurvefeat As features.feature = fitCurveBuilder1.getfeature
Hope this helps.
Frank Swinkels