GroupShape.Paths call

G

Guy..L

When the Paths method on a group shape is invoked, a collection of paths are
returned. According to the 2007 SDK documentation, there is a path for each
geometry section.

Experimentally, there appears to be a recursive walk through the group and
its members to retrieve this collection of paths. (Please correct me if I am
mistaken.)

Is there any way to know if a path is from a NoShow geometry?

If a parallel recursive walk is needed to build a breadcrumb-type list of
NoShow values, what is the ordering of the walk? Is it depth first search??
 
C

Chris Roth [Visio MVP]

Hi Guy,

If you do the parallel walk through sub-shapes and their Geometry
sections to get the NoShow values, it does indeed work. I have done this
myself.

I don't remember off-hand which order I used, but I believe that I just
followed the order returned by the shapes collection.

For Each shp in shpGrp.Shapes

' Do geometry sections
If shp.Shapes.Count > 0 Then
'Recurse into shp.Shapes
End If

Next shp

This is probably depth-first, since you will go 'down' into sub-groups
before you go 'across' sibling sub-shapes.

--
Hope this helps,

Chris Roth
Visio MVP


Visio Guy: Smart Graphics for Visual People

Articles: http://www.visguy.com
Shapes: http://www.visguy.com/shapes
Dev: http://www.visguy.com/category/development/
Forum: http://www.viguy.com/vgforum
 
C

Cole

We're also struggling here with the same issue.

We need to find the outline of all shapes within a group so we can determine whether any visible points on two different shapes overlap.

The two techniques we have used so far are:

1. SpatialNeighbours - this does not work because there is no way to tell the method to ignore hidden (NoShow geometry) shapes.

2. Calculating the BoundingBox - this does not work as it also considers hidden shapes.


So, we're left with trying to create a polygon from the paths of two shapes and compare them to see whether the intersect.

Unfortunately though, we have the same problem in that we cannot calculate one set of paths for all visible shapes in a group and plot them to create a representative polygon.

Any alternative solutions out there?

thanks,
RC




Chris Roth [Visio MVP] wrote:

Re: GroupShape.Paths call
16-Jun-09

Hi Guy,

If you do the parallel walk through sub-shapes and their Geometry
sections to get the NoShow values, it does indeed work. I have done this
myself.

I don't remember off-hand which order I used, but I believe that I just
followed the order returned by the shapes collection.

For Each shp in shpGrp.Shapes

' Do geometry sections
If shp.Shapes.Count > 0 Then
'Recurse into shp.Shapes
End If

Next shp

This is probably depth-first, since you will go 'down' into sub-groups
before you go 'across' sibling sub-shapes.

--
Hope this helps,

Chris Roth
Visio MVP


Visio Guy: Smart Graphics for Visual People

Articles: http://www.visguy.com
Shapes: http://www.visguy.com/shapes
Dev: http://www.visguy.com/category/development/
Forum: http://www.viguy.com/vgforum

Guy..L wrote:

EggHeadCafe - Software Developer Portal of Choice
How to hold a successful meeting
http://www.eggheadcafe.com/tutorial...6d-cab220b2f1b9/how-to-hold-a-successful.aspx
 

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