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

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

Anonymous
Not applicable
414 Views
0 Replies
Message 1 of 1

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

Anonymous
Not applicable

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. 

0 Likes
415 Views
0 Replies
Replies (0)