これを行うUIのツールは知りませんが、IMSegmentation3インターフェイスを介してプログラムで実行できます。
protected override void OnClick()
{
try
{
var fSel = ArcMap.Document.FocusMap.get_Layer(1) as IFeatureSelection;
if (fSel.SelectionSet.Count == 0)
{
MessageBox.Show("choose a line feature first");
return;
}
var gc = ArcMap.Document.FocusMap as IGraphicsContainer;
IFeature feat = ((IFeatureLayer)fSel).FeatureClass.GetFeature(fSel.SelectionSet.IDs.Next());
var pnts = GetPoints((IPolyline)feat.ShapeCopy, 2.0);
foreach (IPoint pnt in pnts)
{
var elem = new MarkerElementClass() as IElement;
elem.Geometry = pnt;
((IMarkerElement)elem).Symbol = new SimpleMarkerSymbolClass();
gc.AddElement(elem, 0);
}
((IActiveView)ArcMap.Document.FocusMap).PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary>
/// Get points at evenly spaced measures along a polyline
/// </summary>
/// <param name="polyline"></param>
/// <param name="count"></param>
/// <returns></returns>
private List<IPoint> GetPoints(IPolyline polyline, double mspacing)
{
var outList = new List<IPoint>();
var mseg = polyline as IMSegmentation3;
if (mseg.MMonotonic == esriMMonotonicEnum.esriMNotMonotonic)
throw new Exception("polyline not monotonic");
for (double m = mseg.MMin; m <= mseg.MMax; m += mspacing)
{
var geomcoll = mseg.GetPointsAtM(m, 0.0);
if (geomcoll != null && geomcoll.GeometryCount > 0)
{
var pnt = geomcoll.get_Geometry(0) as IPoint;
outList.Add(pnt);
}
}
return outList;
}