Re: SpatialSearch not working on 1D shapes
- From: "Al Edlund" <edlund@xxxxxxxxxxxxx>
- Date: Thu, 21 Apr 2005 09:54:37 -0500
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
>
.
- Follow-Ups:
- Re: SpatialSearch not working on 1D shapes
- From: R Brackett
- Re: SpatialSearch not working on 1D shapes
- References:
- SpatialSearch not working on 1D shapes
- From: rusty . brackett
- SpatialSearch not working on 1D shapes
- Prev by Date: SpatialSearch not working on 1D shapes
- Next by Date: Re: SpatialSearch not working on 1D shapes
- Previous by thread: SpatialSearch not working on 1D shapes
- Next by thread: Re: SpatialSearch not working on 1D shapes
- Index(es):
Relevant Pages
|