TheSwamp

Code Red => .NET => Topic started by: vegbruiser on April 14, 2014, 11:19:47 AM

Title: SelectCrossingPolygon making me crazy...
Post by: vegbruiser on April 14, 2014, 11:19:47 AM
Why can I get seemingly get selectCrossingPolygon to correctly select mtext in two locations, yet in two other locations using exactly the same method in the same drawing it completely ignores the same MText object. The other Mtext objects were copied there by me as a test of WTF is going on!

This is driving me potty...  Gaah!

:x
Title: Re: SelectCrossingPolygon making me crazy...
Post by: Jeff_M on April 14, 2014, 11:43:44 AM
Are all of the objects visible on screen? Are all of the CrossingPolygon vertices within the visible view?
Title: Re: SelectCrossingPolygon making me crazy...
Post by: vegbruiser on April 14, 2014, 11:50:38 AM
I just threw in a ZoomExtents in case that was the problem and it doesn't make any difference.

NinjaEdit: In two locations (within the bounds of the drawing frame) this
Code: [Select]

Dim acTypValAr() As TypedValue = New TypedValue() {New TypedValue(DxfCode.Start, "*")}
Dim pnt1, pnt2, pnt3, pnt4 As Point3d
pnt1 = tmppntcoll.Item(0)
pnt2 = tmppntcoll.Item(1)
Dim selFilter As New SelectionFilter(acTypValAr)
pmtSelRes = Active.Editor.SelectCrossingWindow(pnt1, pnt2, selFilter)
correctly selects the Mtext object.

In the other locations even when Zoomed to Extents it doesn't find the MText entity.
Title: Re: SelectCrossingPolygon making me crazy...
Post by: vegbruiser on April 15, 2014, 03:48:05 AM
So, after a night of contemplation, it appears my code was correctly finding the MText object, but that it had been found by an earlier much larger search rectangle and subsequently deleted.  /SkulksOffIntoTheCornerSulking  :oops:  :oops:
Title: Re: SelectCrossingPolygon making me crazy...
Post by: Kerry on April 15, 2014, 04:07:41 AM
So, after a night of contemplation, it appears my code was correctly finding the MText object, but that it had been found by an earlier much larger search rectangle and subsequently deleted.  /SkulksOffIntoTheCornerSulking  :oops:  :oops:

I see no reason to hide. The fact that you found and can rectify the issue is cause for joy and a weekend of rowdy celebration.
Title: Re: SelectCrossingPolygon making me crazy...
Post by: Jeff H on April 15, 2014, 06:08:16 AM
A man much wiser than me once said or actually wrote
Quote
I see no reason to hide. The fact that you found and can rectify the issue is cause for joy and a weekend of rowdy celebration.

To add to his quote, one the best ways of learning is experimenting and sometimes when it gets frustrating you have to remind yourself what all you learned by debugging, changing different values to see what happens and seeing the results, etc.......
Title: Re: SelectCrossingPolygon making me crazy...
Post by: WILL HATCH on April 15, 2014, 03:07:49 PM
Not to mention the BEvERages along the way