HI,
I got stuggle for this for a while. If there are nothing selected. PromptSelectionResult.Status == PromptStatus.Error, is this correct?
Can I return a SelectionSet without object selected, a null selectionset?
here is my code?
[code]
public static SelectionSet SelectByPolygon(RsSelect Mode, Point3dCollection ptList, TypedValue[] values)
{
Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
PromptSelectionResult prSelRes;
SelectionFilter filterSS = new SelectionFilter(values);
prSelRes = ed.SelectFence(ptList,filterSS);
if (prSelRes.Status != PromptStatus.OK)
{
// debug
DDebug.WriteMessage("\n RSss_SelectByPolygon2:" + prSelRes.Status);
return null;
}
SelectionSet ss = prSelRes.Value;
return ss;
}
[/code]
Thank you
Wes
Windows 10 64 bit, AutoCAD (ACA, Map) 2023