GUID of a shape / UniqueID

B

Bernhard Marx

Hello,

I'm using Visio 2002 Prof.
I have some self designed shapes in the document stencil. I use the document
stencil, because of automatic updating the shapes in the document (inside of
the drawing). That work fine.
Every shape in the drawing gets via VBA some user-defined properties. When I
update a mastershape every shape in the drawing looses his informations in
the userdefined properties.
So I tried to use the uniqueID of a shape. I fetch the ID in VBA via ( Code:
ID=Shape.uniqueID(1) ). That work's fine too. But after I updated the
mastershape once again the shapes in the drawing have all NEW ID's.

So my question: How can I identify a shape in a drawing always. I thought
the way would be the unique ID.

Best regards
Bernhard Marx
 
A

Al Edlund

when you drop the object on the page consider something like this
shpObj.UniqueID(visGetOrMakeGUID)

al
 
B

Bernhard Marx

Hello Al,

I don't drop the object. Its automatic changed by Visio when updating the
master shape, so where can I interact to this event?

Bernhard
 
A

Al Edlund

The uniqueid is unique within the document. you mention that you " update a
mastershape every shape in the drawing looses his informations in the
userdefined properties". AFAIK If you update a master in the document
stencil it is designed to change what is in the document that is based on
that master. If you update in the "master" stencil it should not mirror to
the document (and of course shapes that have already been put in the
document will not change).

Al
 
B

Bernhard Marx

Hello Al,

sorry you're not right. that the "advantage" of the document stencil that
all shapes based on the mastershape are updated with the new mastershape
appearence. But after the document shapes are update they got a new uniqueid.

Bernhard
 

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