Author Topic: SelectCrossingPolygon making me crazy...  (Read 2084 times)

0 Members and 1 Guest are viewing this topic.

vegbruiser

  • Guest
SelectCrossingPolygon making me crazy...
« 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

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: SelectCrossingPolygon making me crazy...
« Reply #1 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?

vegbruiser

  • Guest
Re: SelectCrossingPolygon making me crazy...
« Reply #2 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.
« Last Edit: April 14, 2014, 12:01:13 PM by AlexF »

vegbruiser

  • Guest
Re: SelectCrossingPolygon making me crazy...
« Reply #3 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:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: SelectCrossingPolygon making me crazy...
« Reply #4 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.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff H

  • Needs a day job
  • Posts: 6144
Re: SelectCrossingPolygon making me crazy...
« Reply #5 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.......

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: SelectCrossingPolygon making me crazy...
« Reply #6 on: April 15, 2014, 03:07:49 PM »
Not to mention the BEvERages along the way