Spatial Relation Problem: visSpatialContains or combination

O

OriginalPrankster

I want to check the relation between 2 shapes using the
"Shape.SpatialRelation"-property.

In case one shape completely contains the other everything is ok, but when
i get to the point where the border of the underlying shape touches the
border of the containing shape visSpatialOverlap is returned, what is ok in a
way, but not what i want.
Is there any way to check if the smaller shape exeeds the Bounds of the
underlying shape? May be a combination of this returned values or something
like that?
Thank you for any answer and/or idea.
 
C

Chris Roth [ Visio MVP ]

That's a good idea - check for a return of contained + overlap? I don't know
offhand if the return values can be combinations.

You could also play with the tolerance argument. That would probably return
a "contained" for a shape that touches the boundaries of another shape.

--

Hope this helps,

Chris Roth
Visio MVP
 
O

OriginalPrankster

I've tried as you said, but it wont work. Always when i reach the bounds of
the underlying shape 'Overlap' is returned. There are only three flags that
can be set on SpatialRelation. I've tried them in any combination, but i
never got back 'visSpatialContains' from this function when the shapes are
touching.

The returntype can also be a combination, but contains is a 2 and overlap a 1
binary -> everythiing i got back was a 1 or a zero for some combinations of
the flags. I never got a 3 - which should be the combination.

Is there any other possibility to gain this functionality?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top