Hey,I am trying to use the construct offset example, which is basically a copy parallel command. I have a selected polyline feature and I am trying to use the selected feature as an Ipolyline input for the construct offset method. How do you cast the feature selection to a polyline?This is for a tool in ArcMap 9.3.1Thanks, Chris
pFeatureSelection = (IFeatureSelection)pLayer;
pSelectionSet = pFeatureSelection.SelectionSet;
IPolyline inpolyline = null;
ICursor pCursor;
pSelectionSet.Search(null, false, out pCursor);
inpolyline = (IPolyline)pFeatureSelection; <== crashes here
ConstructOffset(inpolyline, offset);