You can use “Editor. SetImpliedSelection” API to set the pick first (selection with grips) selection set. The code below is a code for sample command, which prompts for entity selection and places it to pick first selection set. Please note it's necessary to specify command flags for commands, which access pick first selection set.
[CommandMethod("SelectTest", CommandFlags.UsePickSet |
CommandFlags.Redraw | CommandFlags.Modal)]
static public void SelectTest()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
try
{
PromptSelectionResult result = ed.GetSelection();
if (result.Status != PromptStatus.OK)
return;
ed.SetImpliedSelection(result.Value.GetObjectIds());
}
catch(System.Exception ex)
{
ed.WriteMessage(ex.Message);
}
}