Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I develope an application with c# to create offset in arcgis . i want to convert this application to python . how can i do these in python? I try to use this sample . it was very helpful for me but i don't know how can i convert this code : ppolyline2 =(IPolyline) pfeature.ShapeCopy; when i want to use pfeature.shapecopy this error showed in python ide: Runtime error : NULL COM pointer access

pfc = pfeaturelayer.FeatureClass;
                IFeatureCursor pfcursor;
                IFeature pfeature;
                pfcursor = pfc.Search(null, false);
                pfeature = pfcursor.NextFeature();



                do
                {
                    IPolyline ppolyline2;
                    ppolyline2 =(IPolyline) pfeature.ShapeCopy;
                    offset = esriConstructOffsetEnum.esriConstructOffsetMitered;
                    ///

                    IConstructCurve3 construct = new PolylineClass();

                    object missing = Type.Missing;
                    construct.ConstructOffset(ppolyline2 ,100.3,offset);
                    pfeature = pfcursor.NextFeature();
                    IFeature newFeature = pfc.CreateFeature();
                    newFeature.Shape = (IGeometry)construct;
                    newFeature.Store();



                } while (pfeature != null);
share|improve this question
pfeature.copy() ? – RickyA Oct 8 '12 at 14:13

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.