The ConstructExtended of IConstructCurve does not work??how to solve??

Discussion created by xiaodonggis22 on May 9, 2012
Latest reply on May 15, 2012 by Hornbydd
Hello,I want ot create a extension line of a line to extended to the desstination line, so I used the   ConstructExtended of  IConstructCurve , but it does not work, the follow is my code, and I use the arcobject 10.0 and vs 2010 to code it?How to solve this problem, because in VS 2005 and AE 9.2 , it tested correctly.

here is my code:

    IPoint pPt = new PointClass();
     IPolyline slopeLine = new PolylineClass();
     slopeLine.FromPoint = startPt;
     slopeLine.ToPoint = CreatePointByAngleDistance(startPt, radAngle,  50);
     slopeLine.SpatialReference = pSR;
     IConstructCurve2 pConCurve = new PolylineClass();
     bool isExtensionPerfomed = false;
   ICurve pCurve1 = slopeLine as ICurve;
    ICurve pCurve2 = desLine as ICurve;
    pConCurve.ConstructExtended(pCurve1,pCurve2, (int)esriCurveExtension.esriDefaultCurveExtension,ref isExtensionPerfomed);
    pPt = slopeLine.ToPoint;