Select to view content in your preferred language

Shapes : new PolylineClass() and new GeometryEnvironment() in AL 10 Desktop

2324
2
12-15-2011 11:03 AM
RizwanBashir
Emerging Contributor
Hi    
    I created one application for one of my client for version 9.3 which worked great, now my customer is upgraded to AL 10 desktop and want the application upgraded as well.
When I converted it I get errors on these two lines which I am unable to resolve. is there any other work around for this ?

       IPointCollection4 pointCollection4 = new PolylineClass();

Error: Interop type 'ESRI.ArcGIS.Geometry.PolylineClass' cannot be embedded. Use the applicable interface instead.

           
            IGeometryBridge2 geometryBridge = new GeometryEnvironment();

Error : Cannot implicitly convert type 'ESRI.ArcGIS.Geometry.GeometryEnvironment' to 'ESRI.ArcGIS.Geometry.IGeometryBridge2'. An explicit conversion exists (are you missing a cast?)

Any help would be highly appreciated.

Best Regards
Rizwan Bashir
0 Kudos
2 Replies
JeffWickstrom
Esri Contributor
Hello Rizwan,

Have you tried something like ...

IPointCollection4 pointCollection4 = new PolylineClass() as IPointCollection4;

IGeometryBridge2 geometryBridge = new GeometryEnvironment() as IGeometryBridge2;

(adding the type caste)

If you are still stuck I'll poke at it in the compiler.

Jeff
0 Kudos
RizwanBashir
Emerging Contributor
Hi
   Thanks it worked great. there was a change in this line only , other worked as suggested.

IPointCollection4 pointCollection4 = new Polyline() as IPointCollection4;


Thanks again for prompt response.

Best Regards
Rizwan Bashir
0 Kudos