Puzzled! Sometimes sheets are called Sheet.xx ???

M

Michael

Hi,
I have a number of shapes in a stencil and gave them names. Let's say Xyz
and Abc

99 out of a 100 when I drag a shape to the drawing they
get called Xyz.11 or another number, but sometimes
the shape is called Sheet.11 or another number...

When I look at the shape using Format -> Special the Shape name is set to
Sheet, but clearly
see the master name as Xyz or Abc ...

I use the shape names in my programs to act on the shapes, so getting a
Sheet as name sometimes
leaves me clueless on what kind of shape I am accessing...

Any one a clue why this happens sometimes??? (using Visio 2000-SR1)

Michael
 
M

Mark Nelson [MS]

The real observation you should make is "Sometimes sheets are NOT called
Sheet.xx". Every Visio shape has a NameID property that takes the form
Sheet.xx. This is the official name of the shape that you would use if you
were referencing the shape in a Shapesheet formula.

Shapes also have a Name property, which is what you see in Format > Special
or the Drawing Explorer. If the shape is an instance of a Master, the Name
is the name of the master plus the ID from the NameID. If the shape is not
an instance of a Master, the Name is equal to the NameID. Drawing shapes
with the drawing tools creates masterless shapes. Also ungrouping a shape
breaks its association with a master.

You can programmatically ask for either the Name or NameID. There is also a
Master property that will give you the name of the master a shape is
instanced from.
 

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