<?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 Re: VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in Memor in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505724#M70087</link>
    <description>Try to dim a new Point3dcollection but all I'm getting is a "The specified module can not be found." error mesage.&lt;BR /&gt;
&lt;BR /&gt;
Why would this happen?&lt;BR /&gt;
&lt;BR /&gt;
(I'm trying to dim a collection to use with Intersectwith...)</description>
    <pubDate>Sun, 10 Jan 2010 21:33:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-10T21:33:53Z</dc:date>
    <item>
      <title>VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in Memor</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505720#M70083</link>
      <description>I am building a VB.NET program to extract data from drawings without opening and rendering each drawing.  I accomplish this with:&lt;BR /&gt;
 &lt;BR /&gt;
'Initialize Database Source as Read&lt;BR /&gt;
Dim dbExtract As New DatabaseServices.Database&lt;BR /&gt;
dbExtract.ReadDwgFile(FileName, IO.FileShare.Read, True, "")&lt;BR /&gt;
 &lt;BR /&gt;
Since this means that the drawings will be opened in memory, the EditorInput is not available which is where the crossing window selection set methods are.  Does anyone know how to effectively search a designated window for any lines or plines that cross it without having the EditorInput?</description>
      <pubDate>Fri, 12 Jun 2009 16:46:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505720#M70083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T16:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in Memor</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505721#M70084</link>
      <description>The selection mechanism uses the display cache for speed. The normal way to do it 'in memory' is to iterate through the entities in model space querying their geometry against the area you want to select in. The simplest way to do this is to query their extents, but this can produce false hits for some geometries. A (relatively) simple alternative might be (for example) to create a region and call IntersectWith on that region passing in every entity you iterate through. That should base your geometric query on the actual entity graphics.&lt;BR /&gt;
&lt;BR /&gt;
Your problem is that one way or another (without being able to use the display cache) you're iterating all the entities in model space.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Stephen&lt;BR /&gt;
Autodesk Developer Network</description>
      <pubDate>Thu, 18 Jun 2009 15:44:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505721#M70084</guid>
      <dc:creator>StephenPreston</dc:creator>
      <dc:date>2009-06-18T15:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in  Memor</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505722#M70085</link>
      <description>It may also help if you knew that the EditorInput graphical selection &lt;BR /&gt;
methods (window/crossing, fence, etc.) are only accurate to one display &lt;BR /&gt;
pixel at the current view magnification (consider that if you zoom out far &lt;BR /&gt;
enough, your entire drawing can fit within a single pixel).&lt;BR /&gt;
&lt;BR /&gt;
Those methods are primarly for user-interactive selection, rather than &lt;BR /&gt;
purely analytical selection or precise topograhical boundary classification.&lt;BR /&gt;
&lt;BR /&gt;
Considering how often the request for this comes up in places like this, and &lt;BR /&gt;
how often folks mistakenly assume that the EditorInput/(ssget) selection &lt;BR /&gt;
methods are how it should be done, the lack of general APIs for doing &lt;BR /&gt;
precise topographical operations like your case, is a long-standing and (if &lt;BR /&gt;
you ask me) quite shameful belmish on AutoCAD programmability in general.&lt;BR /&gt;
&lt;BR /&gt;
A well-designed high-level API should provide that functionality via a &lt;BR /&gt;
formal protocol. Unfortunately, while the core functionality does exist in &lt;BR /&gt;
AutoCAD, it is deeply buried in amonst other places, the BOUNDARY and HATCH &lt;BR /&gt;
commands and the MPOLYGON custom object, and is not exposed via any API.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BJHUFFIN&gt; wrote in message news:6200878@discussion.autodesk.com...&lt;BR /&gt;
I am building a VB.NET program to extract data from drawings without opening &lt;BR /&gt;
and rendering each drawing. I accomplish this with: 'Initialize Database &lt;BR /&gt;
Source as Read Dim dbExtract As New DatabaseServices.Database &lt;BR /&gt;
dbExtract.ReadDwgFile(FileName, IO.FileShare.Read, True, "") Since this &lt;BR /&gt;
means that the drawings will be opened in memory, the EditorInput is not &lt;BR /&gt;
available which is where the crossing window selection set methods are. Does &lt;BR /&gt;
anyone know how to effectively search a designated window for any lines or &lt;BR /&gt;
plines that cross it without having the EditorInput?&lt;/BJHUFFIN&gt;</description>
      <pubDate>Thu, 18 Jun 2009 19:23:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505722#M70085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-18T19:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in Memor</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505723#M70086</link>
      <description>You're right!  Using the IntersectWith was the best approach.  To assist others like myself who would like some reference information regarding the same issue I had, I've copied the important pieces of my code.  Note though, I only cut and paste the pieces pertinent to this discussion.  &lt;BR /&gt;
&lt;BR /&gt;
The key to understanding this is that the IntersectWith method is using the Point3dCollection as a repository for the intersection points.  Therefore, consider this argument as more of a ByRef and not ByVal when using IntersectWith.&lt;BR /&gt;
&lt;BR /&gt;
    'Create Point Collection for polygon crossing window and Assign Points&lt;BR /&gt;
    Dim ptcollSelectionWindowFront As New Point3dCollection&lt;BR /&gt;
            ptcollSelectionWindowFront.Add(ptTBPoint1)&lt;BR /&gt;
            ptcollSelectionWindowFront.Add(ptTBPoint2)&lt;BR /&gt;
            ptcollSelectionWindowFront.Add(ptExtTBPoint2)&lt;BR /&gt;
            ptcollSelectionWindowFront.Add(ptExtTBPoint1)&lt;BR /&gt;
&lt;BR /&gt;
    'Intialize Polygon Crossing Window&lt;BR /&gt;
    Dim polySelWindowFront As New DatabaseServices.Polyline2d(DatabaseServices.Poly2dType.SimplePoly, _&lt;BR /&gt;
                                                         ptcollSelectionWindowFront, 0, True, 0, 0, Nothing)&lt;BR /&gt;
&lt;BR /&gt;
    'Initialize Crossing Indicator&lt;BR /&gt;
    Dim blnCrossing As Boolean = False&lt;BR /&gt;
&lt;BR /&gt;
    'Code here was to get the Entity as the program iterates through the entities&lt;BR /&gt;
    'Assigned each value in the iteration to 'CrossEntity'&lt;BR /&gt;
&lt;BR /&gt;
    'Determine if entity is Line/Pline and Crosses the window&lt;BR /&gt;
        If TypeOf CrossEntity Is DatabaseServices.Line Or TypeOf CrossEntity Is DatabaseServices.Polyline Then&lt;BR /&gt;
            Dim ptcollCross As New Point3dCollection&lt;BR /&gt;
            WindowPolygon.IntersectWith(CrossEntity, DatabaseServices.Intersect.OnBothOperands, ptcollCross, 0, 0)&lt;BR /&gt;
            If ptcollCross.Count &amp;gt; 0 Then&lt;BR /&gt;
                blnCrossing = True&lt;BR /&gt;
            Else&lt;BR /&gt;
                blnCrossing = False&lt;BR /&gt;
            End If&lt;BR /&gt;
        End If</description>
      <pubDate>Mon, 29 Jun 2009 20:07:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505723#M70086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-29T20:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in Memor</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505724#M70087</link>
      <description>Try to dim a new Point3dcollection but all I'm getting is a "The specified module can not be found." error mesage.&lt;BR /&gt;
&lt;BR /&gt;
Why would this happen?&lt;BR /&gt;
&lt;BR /&gt;
(I'm trying to dim a collection to use with Intersectwith...)</description>
      <pubDate>Sun, 10 Jan 2010 21:33:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505724#M70087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-10T21:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET, Effective Crossing Window without EditorInput, DWGs Opened in Memor</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505725#M70088</link>
      <description>this works nice for the objects that are crossed by the rectangle, but how about those that are inside?&lt;BR /&gt;
SelectCrossingWindows selects them both</description>
      <pubDate>Mon, 10 May 2010 15:11:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-effective-crossing-window-without-editorinput-dwgs-opened/m-p/2505725#M70088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-10T15:11:27Z</dc:date>
    </item>
  </channel>
</rss>

