Re: SpatialSearch not working on 1D shapes



there was a recent entry (below : tolerance) that discussed this. the user
discovered that spatialsearch only triggers on the vertex of a 1d shape. I
don't know if it's a bug or not.
al

<rusty.brackett@xxxxxxxxx> wrote in message
news:1114094288.613846.33270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I am using the Visio2003 Drawing Control in a .NET windows app. I have
> some code that will return a shape (actually a Selection object) when
> the user right clicks on a shape. I use this to display a custom
> context menu for my app.
>
> My issue is that the code works perfectly as long as the shape is a two
> dimensional shape (the 'State' shape from the ROOM stencil is the shape
> I am using in my app) but returns null when the clicked shape is a one
> dimensional shape (the 'Transition' shape from the ROOM stencil). The
> code I am using to get the clicked shape follows:
>
> // Return a list of shapes at the clicked location.
> Selection foundShapes = currentPage.get_SpatialSearch(clickLocationX,
> clickLocationY,
> (short)VisSpatialRelationCodes.visSpatialContainedIn, tolerance,
> (short)VisSpatialRelationFlags.visSpatialFrontToBack);
>
> I have experimented with the tolerance value (with 2D shapes it works
> fine with a value of .0001, but have tried up to .1 for the 1D shape
> with no luck) and all the flags in the VisSpatialRelationCodes
> constants (tried them all, the only one that works at all is the one
> used in the code snippet above).
>
> I have tried with the shapes being selected and not being selected,
> being connected and being unconnected and got the same results. The 2D
> shape is always returned in the Selection object and a 1D shape is
> never returned (i.e. SpatialSearch returns null).
>
> Can anyone see why the 1D Transition shapes wouldn't be returned by the
> SpatialSearch method? What am I missing?
>
> FWIW, I am only trying with the shapes I mentioned (i.e. 'State' and
> 'Transition' shapes from the 'ROOM' stencil). Our application uses
> these shapes exclusively.
>
> Any help is greatly appreciated,
>
> Russell
>


.



Relevant Pages

  • SpatialSearch not working on 1D shapes
    ... I am using the Visio2003 Drawing Control in a .NET windows app. ... Selection foundShapes = currentPage.get_SpatialSearch(clickLocationX, ... shape is always returned in the Selection object and a 1D shape is ... Can anyone see why the 1D Transition shapes wouldn't be returned by the ...
    (microsoft.public.visio.developer)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)
  • Re: No sound...?
    ... TextEdit - open selected file. ... If I want to open a selected file, ... applicaiton that selection will be passed to the application in the ... That is a bad name - as Import Image is not the name of an app I would ...
    (uk.comp.sys.mac)
  • Re: I am using the DIRLISTBOX in VB 6..Need it to show hidden directories. I cant find a way for it
    ... >> I am using the DIRLISTBOX in VB 6..Need it to show hidden directories. ... I will need to be able to select the share via controls ... >> for Dir location only selection etc. ... This app is going to be used in house, ...
    (microsoft.public.vb.controls)