Hi, just a few hints, if you indend to use ArcObjects and C#, and have not found out already:
There are many detalis to consider, and a lot of documentation to read. Online help is useful.
This is approximately how I do it:
| "Acivate split processing mode in your code via custom tool event" "Click on map" ... IPoint p = mxDoc.CurrentLocation; IEnvelope e = p.Envelope; e.Expand( searchRadius); map.SelectByShape(e,env,justOne); IFeatureSelection fs = (IFeatureSelection)lineFeaturelayer; IEnumIDs en = fs.SelectionSet.IDs; | | en.Reset(); | | for(int i=0; i<fs.SelectionSet.Count; i++) | | { | | | Int32 fid = en.Next(); | } | ... |
IFeature f = lineFeaturelayer.FeatureClass.GetFeature(fid); | |
IPolyline plin = (IPolyline)f.Shape |
| plin.SplitAtPoint(p, projecPointOnLine, createPart, out splitDone, out newPartIndex, out newSegmentIndex); feature1.shape = .. feature1.Store(); feature2.shape = .. feature2.Store(); ... |