Shape Identity

B

Barney

I'm trying to put a custom property "ShapeID" into every shape on my
page such that each one contains its unique shape identity.

To do this I am adding a custom property row to the Master Shape and
using =ID() in the value field. It applies this change to every shape
instance on my page as expected, but does not re-evaluate the formula
for each shape instance. If I go into a single shape and enter the
formula, it evaluates the formula as expected.

Is there any way I can force each instance of the shape to re-evaluate
its shapesheet?

Thanks.
 
D

David Parker

In code, you can use the Cell.Trigger for each shape to force a cell formula
to re-evaluate, but you shouldn't really need to using =ID().
What version of Visio are you using, and is it fully patched?
 
B

Barney

I am using Visio 2003 with SP1 (11.4301.6360)

Would this functionality be fixed with any of the Service Packs?
 
D

David Parker

SP3 has just been released.
I do remember some problems with recalculation of cell formulae in the past,
but I cannot remember exactly when it got fixed.
Is there any reason why you can't have the latest SP and try again?
 
D

David Parker

One trick I used to do was to iterate the shape instances of the Master and
pas the formula "=" into the cell.
This causes the instance shape cell to re-inherit from Master shape cell.

You can do the same thing manually in the ShapeSheet too.
So if you have a cell formuyla that is showing blue color (which means it
has a local formula), just entering = will return it to black (inherited)

Hope this helps.
 
B

Barney

Thanks for this, David.

I installed SP3 and the problem is resolved. Thanks.

I'm very interested in what you say about passing "=" into cells, as I
have run into other recalculation problems before, so this could be a
universal "quick fix". However, I have tried to put a bit of VBA
together to do this, but seem to be stumbling at the very last part of
actually setting the Custom Property cell to the value "=". Is there
something I should know?

Thanks,
Pete.
 

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