Distinguished Contributor
Posts: 351
Registered: ‎12-05-2003
Message 1 of 1 (126 Views)

PromptStatus == Error means nothing selected?

126 Views, 0 Replies
10-24-2005 02:17 PM
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?
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;

Thank you
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.