R
Reinier Post
Dear Visio group,
Visio (2000 and 2002) allows shapes within groups to be taken outside
their containing groups. I'd like to test for this condition, even on
unfilled groups (NoFill TRUE).
But SpatialNeighbors and its relatives won't let me do it.
No matter what arguments I supply,
x.SpatialNeighbors(y,...)
never returns True when x.ContainingGroup = y or y.ContainingGroup = x,
regardless of their relative positions. I have varied the spatial
relation, the IterationMode of the result, and the ResultRoot argument.
This means that I can see no way at all to use these routines for
my intended purpose, except by temporarily modifying the diagram
prior to testing. But that introduces problems with undoing, etcetera.
A Visio document with some code to illustrate the effect:
http://www.win.tue.nl/~rp/visio/spatialneighbors-for-group-containment.vsd
At this moment, I'm using my own handcoded overlap tests,
but they are slow.
Am I missing something? Is there a better way?
Visio (2000 and 2002) allows shapes within groups to be taken outside
their containing groups. I'd like to test for this condition, even on
unfilled groups (NoFill TRUE).
But SpatialNeighbors and its relatives won't let me do it.
No matter what arguments I supply,
x.SpatialNeighbors(y,...)
never returns True when x.ContainingGroup = y or y.ContainingGroup = x,
regardless of their relative positions. I have varied the spatial
relation, the IterationMode of the result, and the ResultRoot argument.
This means that I can see no way at all to use these routines for
my intended purpose, except by temporarily modifying the diagram
prior to testing. But that introduces problems with undoing, etcetera.
A Visio document with some code to illustrate the effect:
http://www.win.tue.nl/~rp/visio/spatialneighbors-for-group-containment.vsd
At this moment, I'm using my own handcoded overlap tests,
but they are slow.
Am I missing something? Is there a better way?