This document is archived and information here might be outdated.Recommended version.
Sample: Convert part to feature command (ArcObjects .NET 10.4 SDK)
Convert part to feature command
How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Start Visual Studio, open the solution, and build the project.
Register the output dll.
Start ArcMap, load at least one line or polygon feature class (preferably with multipart features), and start an edit session.
If there are no multipart features, create one by digitizing a feature. On the Sketch context menu, select finish part, then digitize at least one more part. When you're finished creating parts, select Finish sketch or double-click to finish the sketch.
Double-click at least one part of the multipart feature to enable the edit sketch.
Right-click the edit sketch (if it's a polygon, click the boundary) of the part you want to convert to a single part and select the Convert Part to Feature command. The part is removed from the original feature, and a new feature is created in the same feature class.