For 1200 points (or even up to say 12M points?) I'd just put them into memory as a Generic Collection - in this case a SortedList of lists. This could be simplified by just skipping points when you run into a situation with multiple points that are same distance from the origin point. Also, for performance, consider using a hashtable instead of a SortedList, and sorting once after inserting all distances. That would take a few more lines of code though(?).
I didn't have time to test this, but this c# might get you started:
private void SelectNTile(string layer1, string layer2, double nTile)
{
var fLayer1 = FindLayer(ArcMap.Document.FocusMap, "LayerWithLotsofPoints");
var fLayer2 = FindLayer(ArcMap.Document.FocusMap, "LayerWithOneSelectedPoint");
IFeature feat = GetSingleFeature(fLayer2);
var distList = MakeDistList(fLayer1.FeatureClass,(IPoint)feat.ShapeCopy);
// assume not many points exactly same distance
var nRecs = (int)(distList.Count * nTile); // nTile would be 0.75 for 75%
var Oids = new List<int>();
foreach (KeyValuePair<double, List<int>> kvp in distList)
{
Oids.AddRange(kvp.Value);
if (Oids.Count > nRecs)
break;
}
var fSel = fLayer1 as IFeatureSelection;
var OidArray = Oids.ToArray();
fSel.SelectionSet.AddList(Oids.Count, ref OidArray[0]);
}
private SortedList<double, List<int>> MakeDistList(IFeatureClass fc, IPoint pnt)
{
var outList = new SortedList<double, List<int>>();
var proxOp = pnt as IProximityOperator;
IFeatureCursor fCur = null;
try
{
fCur = fc.Search(null, true); // recycling is faster, we just need OIDs
IFeature feat;
while ((feat = fCur.NextFeature()) != null)
{
double dist = proxOp.ReturnDistance(feat.Shape);
if (!outList.ContainsKey(dist))
outList.Add(dist, new List<int> { feat.OID });
else
outList[dist].Add(feat.OID); // this should rarely happen
}
}
catch
{
throw;
}
finally
{
if (fCur != null)
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(fCur);
}
return outList;
}
private IFeature GetSingleFeature(IFeatureLayer fLayer)
{
var fSel = fLayer as IFeatureSelection;
if (fSel.SelectionSet.Count != 1)
throw new Exception("select one feature in " + fLayer.Name + " first");
var enumIDs = fSel.SelectionSet.IDs;
enumIDs.Reset();
IFeature feat = fLayer.FeatureClass.GetFeature(enumIDs.Next());
return feat;
}
private IFeatureLayer FindLayer(IMap map, string name)
{
throw new NotImplementedException();
}