Message 1 of 1
Odd null reference error on Curve.CreateTransformed() & Curve.CreateOffset() C#

Not applicable
04-22-2019
11:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone,
Just wondering if anybody has experienced this behavior previously.
I have a method that creates offsets for curves in a foreach loop,
it go's through quite allot of curves successfully but throws a null reference exception consistently on the 31st
curve in the iteration.
The Code is as follow's:
Transform offset = Transform.CreateTranslation(mm10 * Direction);
Curve New_Curve = null;
try
{
New_Curve = C.CreateTransformed(offset);//throws here
}
catch (Exception ex)
{
New_Curve = C.CreateOffset(mm10, Direction);//and here
}
both methods fail with the same error, and neither of the methods are receiving any null arguments. (mm10 & Direction are both valid).
any advise would be much appreciated. Thanks.