.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PromptStatus == Error means nothing selected?

0 REPLIES 0
Reply
Message 1 of 1
wesbird
508 Views, 0 Replies

PromptStatus == Error means nothing selected?

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
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost