.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
PromptStat us == Error means nothing selected?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
83 Views, 0 Replies
10-24-2005 02:17 PM
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.D ocumentManager.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
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.D
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
