Take the 2-minute tour ×


public partial class copyparallel : Form
        IApplication papp;
        public IHookHelper phookhelper;
         IPolycurve ppolycurve;

        public copyparallel()

        private void button1_Click(object sender, EventArgs e)

            IFeatureLayer pfeaturelayer;
            IFeatureClass pfc;

            pfeaturelayer = (IFeatureLayer) phookhelper.FocusMap.get_Layer(0);
           pfc = pfeaturelayer.FeatureClass;

           IConstructCurve construct = new PolylineClass();
           object offset = esriConstructOffsetEnum.esriConstructOffsetMitered;

           object missing = Type.Missing;

           IFeatureClass poutfc;
           IFeature newf = pfc.CreateFeature();
           newf.Shape = (IGeometry)construct;


share|improve this question

1 Answer 1

up vote 3 down vote accepted



Dim pFCur As IFeatureCursor
Dim pFeat As IFeature

pFCur = pfc.Search(Nothing, False)
pFeat = pFCur.NextFeature
Do Until pFeat Is Nothing
    Dim pPolyline As IPolyline
    pPolyline = pFeat.ShapeCopy

    'your code to construct the offset

    pFeat = pFCur.NextFeature
share|improve this answer
could you please describe detail ? how can i loop through each feature class to get a polyline ? –  wetland Sep 26 '12 at 21:25
your code work properly . –  wetland Sep 26 '12 at 22:40
How can i use IGPparameter to set parameter for Ipolyline? i want to use this application in toolbox. –  wetland Sep 30 '12 at 9:24

Your Answer


