Visio Shape Object references

D

Dave Crozier

In visio 2003 I am trying to pick up custom properties from a "dimensions"
object which is updated via VBA. The diagram/shape then reflects these
dimensions as measurements.

My question is. Is there a better way of referencing shapes other than by
the Sheet.<n> nomenclature? I have had some success in naming shapes using
the "Format/Special" dialogue, but then can't always seem to refer to the
shape by its name. I'm sure its to do with grouping and any "name references"
eg "Sheet.cShapeName!Prop.myProperty" I put into my coding just seem to set
themselves back to the standard naming by number. I must say that I am
grouping/ungrouping objects quite a lot.

Once I start to drive the application from programming code (VFP in my
case) I want to refer to shapes by name not by number. Hope this makes sense.

Thanks in Anticipation
 
D

David Parker [Visio MVP]

The name and ID of a shape is unique within its parents shapes collection.
You are moving the shapes from one collection to another when you group or
ungroup.
Open the Drawing Explorer and watch the effect of grouping/ungrouping.
It will help you understand why you cannot always find the shape you are
looking for because you are searching in the wrong collection.
 

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