using (Transaction tr = db.TransactionManager.StartTransaction())
{
// ' If the prompt status is OK, objects were selected
if (acSSPrompt.Status == PromptStatus.OK)
{
ObjectIdCollection idcoll
= new ObjectIdCollection
(acSSPrompt
.Value.GetObjectIds());
foreach (ObjectId OID in idcoll)
{
CogoPoint p = (OID.GetObject(OpenMode.ForRead) as CogoPoint);
SelectedPoints.Append<CogoPoint>(p);
}
var sortresult = SelectedPoints.OrderByDescending(p.Northing).ThenByDescending(p.Easting);
//Renumber the points here
tr.Commit();
}
else
{
}
}//end using