• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Distinguished Contributor
    wesbird
    Posts: 273
    Registered: ‎12-05-2003

    PromptStatus == Error means nothing selected?

    82 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.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
    Please use plain text.