I am trying to update my Addin from ArcObject 10.3 to 10.5 using VS2015 .net 5.2 Frame work but I am getting Error
CS1752: CS1752 Interop type 'PointClass' cannot be embedded. Use the applicable interface instead.)
// Get selected line segments end points
pPolyline = pFeature.Shape as IPolyline;
IPoint pOutPoint = new PointClass();
// Convert screen coordinates to Map coordinates
//pPoint = ;
pMxApp = pApp as IMxApplication;
pPoint = pMxApp.Display.DisplayTransformation.ToMapPoint(X, Y);
and same Error here as Well.
//Get normal
ILine pTangent = new LineClass();
pPolyline.QueryTangent(esriSegmentExtension.esriExtendTangentAtFrom, FromDist, false, 100.0, pTangent);
I do appreciate any help or hint
Husham
Solved! Go to Solution.
Thank you Sean, I found that just Removing the suffix Class solve the Problem..
// Get selected line segments end points
pPolyline = pFeature.Shape as IPolyline;
IPoint pOutPoint = new Point();
// Convert screen coordinates to Map coordinates
//pPoint = ;
pMxApp = pApp as IMxApplication;
pPoint = pMxApp.Display.DisplayTransformation.ToMapPoint(X, Y);
//Get normal
ILine pTangent = new Line();
pPolyline.QueryTangent(esriSegmentExtension.esriExtendTangentAtFrom, FromDist, false, 100.0, pTangent);
Check that Embed Interop Types is set to False for your ESRI assembly references. Its set to True by default when you add them in VS.
Thank you Sean, I found that just Removing the suffix Class solve the Problem..
// Get selected line segments end points
pPolyline = pFeature.Shape as IPolyline;
IPoint pOutPoint = new Point();
// Convert screen coordinates to Map coordinates
//pPoint = ;
pMxApp = pApp as IMxApplication;
pPoint = pMxApp.Display.DisplayTransformation.ToMapPoint(X, Y);
//Get normal
ILine pTangent = new Line();
pPolyline.QueryTangent(esriSegmentExtension.esriExtendTangentAtFrom, FromDist, false, 100.0, pTangent);