<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic selection filer typedvalue between X and between Y in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3483536#M55245</link>
    <description>&lt;P&gt;AutoCAD 2012&lt;/P&gt;&lt;P&gt;C#&lt;/P&gt;&lt;P&gt;Windows 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a selection filter to find text objects within a rectangular area using dxf operators (do not want to use Editor.SelectWindow).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whats wrong with the following code attempt?&lt;/P&gt;&lt;P&gt;It causes Fatal Error!&lt;/P&gt;&lt;P&gt;Thx.. Kevn..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TypedValue[] tv2 = new TypedValue[15];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Start, "TEXT"), 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;and"), 1);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;and"), 2);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;gt;"), 3);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.XCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MinPoint.X - 20), 4);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;"), 5);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.XCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MaxPoint.X + 20), 6);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "and&amp;gt;"), 7);&lt;/P&gt;&lt;P&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;and"), 8);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;gt;"), 9);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.YCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MinPoint.Y + 109), 10);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;"), 11);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.YCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MaxPoint.Y + 131), 12);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "and&amp;gt;"), 13);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "and&amp;gt;"), 14);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SelectionFilter sf2 = new SelectionFilter(tv2);&lt;BR /&gt;PromptSelectionResult psr2 = AcadDoc1.Editor.SelectAll(sf2);&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2012 12:25:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-04T12:25:43Z</dc:date>
    <item>
      <title>selection filer typedvalue between X and between Y</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3483536#M55245</link>
      <description>&lt;P&gt;AutoCAD 2012&lt;/P&gt;&lt;P&gt;C#&lt;/P&gt;&lt;P&gt;Windows 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a selection filter to find text objects within a rectangular area using dxf operators (do not want to use Editor.SelectWindow).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whats wrong with the following code attempt?&lt;/P&gt;&lt;P&gt;It causes Fatal Error!&lt;/P&gt;&lt;P&gt;Thx.. Kevn..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TypedValue[] tv2 = new TypedValue[15];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Start, "TEXT"), 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;and"), 1);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;and"), 2);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;gt;"), 3);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.XCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MinPoint.X - 20), 4);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;"), 5);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.XCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MaxPoint.X + 20), 6);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "and&amp;gt;"), 7);&lt;/P&gt;&lt;P&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;and"), 8);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;gt;"), 9);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.YCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MinPoint.Y + 109), 10);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "&amp;lt;"), 11);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.YCoordinate,&lt;BR /&gt;Match1[0].GeometricExtents.MaxPoint.Y + 131), 12);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "and&amp;gt;"), 13);&lt;BR /&gt;tv2.SetValue(new TypedValue((int)DxfCode.Operator, "and&amp;gt;"), 14);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SelectionFilter sf2 = new SelectionFilter(tv2);&lt;BR /&gt;PromptSelectionResult psr2 = AcadDoc1.Editor.SelectAll(sf2);&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 12:25:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3483536#M55245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T12:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: selection filer typedvalue between X and between Y</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3483590#M55246</link>
      <description>&lt;P&gt;.. this also did not work ... fatal error ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TypedValue[] tv2 =&lt;BR /&gt;new TypedValue[]&lt;BR /&gt;{&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;and"),&lt;/P&gt;&lt;P&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;and"),&lt;BR /&gt;new TypedValue((int)DxfCode.Start, "TEXT"),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "&amp;gt;"),&lt;BR /&gt;new TypedValue((int)DxfCode.XCoordinate, Match1[0].GeometricExtents.MinPoint.X - 20),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "and&amp;gt;"),&lt;/P&gt;&lt;P&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;and"),&lt;BR /&gt;new TypedValue((int)DxfCode.Start, "TEXT"),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;"),&lt;BR /&gt;new TypedValue((int)DxfCode.XCoordinate, Match1[0].GeometricExtents.MaxPoint.X + 20),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "and&amp;gt;"),&lt;/P&gt;&lt;P&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;and"),&lt;BR /&gt;new TypedValue((int)DxfCode.Start, "TEXT"),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "&amp;gt;"),&lt;BR /&gt;new TypedValue((int)DxfCode.YCoordinate, Match1[0].GeometricExtents.MinPoint.Y + 109),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "and&amp;gt;"),&lt;/P&gt;&lt;P&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;and"),&lt;BR /&gt;new TypedValue((int)DxfCode.Start, "TEXT"),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "&amp;lt;"),&lt;BR /&gt;new TypedValue((int)DxfCode.YCoordinate, Match1[0].GeometricExtents.MaxPoint.Y + 131),&lt;BR /&gt;new TypedValue((int)DxfCode.Operator, "and&amp;gt;"),&lt;/P&gt;&lt;P&gt;new TypedValue((int)DxfCode.Operator, "and&amp;gt;")&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 12:50:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3483590#M55246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T12:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: selection filer typedvalue between X and between Y</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3485806#M55247</link>
      <description>&lt;P&gt;See if this working for you,&lt;/P&gt;&lt;P&gt;I used Polyline instead of "unknown Match[0]" on my machine:&lt;/P&gt;&lt;PRE&gt;                    Extents3d ext = pline.GeometricExtents;
                    double xmin = ext.MinPoint.X - 20;
                    double ymin = ext.MinPoint.Y + 109;
                    double xmax = ext.MaxPoint.X + 20;
                    double ymax = ext.MaxPoint.Y + 131;
                    Point3d minpt = new Point3d(xmin, ymin, pline.Elevation).TransformBy(Matrix3d.Identity);
                    Point3d maxpt = new Point3d(xmax, ymax, pline.Elevation).TransformBy(Matrix3d.Identity);  
                    string tab = (string)Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("CTAB");
                
                    TypedValue[] tvs = new TypedValue[] { 
              new TypedValue((int) DxfCode.Start, "TEXT"),
              new TypedValue(410, tab),
               new TypedValue((int) DxfCode.Operator, "&amp;lt;AND"),
              new TypedValue((int)  DxfCode.Operator, "&amp;gt;,&amp;gt;,*"), 
              new TypedValue((int) 10, minpt),   
              new TypedValue((int) DxfCode.Operator, "&amp;lt;,&amp;lt;,*"), 
              new TypedValue((int) 10, maxpt), 
              new TypedValue((int) DxfCode .Operator, "AND&amp;gt;")
            };
                    SelectionFilter sf = new SelectionFilter(tvs);

                    PromptSelectionResult psr = ed.SelectAll(sf);

                    if (psr.Status == PromptStatus.OK)
                    {
                        count = psr.Value.GetObjectIds().Length;
                        ed.WriteMessage("\nSelected:    " + count.ToString());

                    }
                    else
                    {
                        ed.WriteMessage("\nBad selection");
                        return;

                    }
                   
                    tr.Commit();
                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000080"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 15:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3485806#M55247</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-05T15:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: selection filer typedvalue between X and between Y</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3489142#M55248</link>
      <description>&lt;P&gt;Dude! You ROCK! Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 09:27:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3489142#M55248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-07T09:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: selection filer typedvalue between X and between Y</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3489250#M55249</link>
      <description>&lt;P&gt;Glad to help &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000" face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 11:01:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/3489250#M55249</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-07T11:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: selection filer typedvalue between X and between Y</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/4978704#M55250</link>
      <description>Hi Hallex,&lt;BR /&gt;&lt;BR /&gt;I have two confusions&lt;BR /&gt;&lt;BR /&gt;1) I am using COM objects, in this case will this logic work.&lt;BR /&gt;2) On what basis is Pline initialised.&lt;BR /&gt;&lt;BR /&gt;Please reply.&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Amit</description>
      <pubDate>Tue, 22 Apr 2014 08:24:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filer-typedvalue-between-x-and-between-y/m-p/4978704#M55250</guid>
      <dc:creator>amitnkukanur</dc:creator>
      <dc:date>2014-04-22T08:24:08Z</dc:date>
    </item>
  </channel>
</rss>

