Dear
i'm new with Arcmap
i have task i need a help in it
i need to make a button to split a selected line into two lines using C#
please i need a help
Best regards
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;
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();
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.