update shapes in visio drawing

M

Martin Englund

Hi,

If someone could solve the following problem I think it would save a lot of
time for many people:

Let's say I have created a template including some macros and a stencil
where the masters have some custom properties.
I use the template to created a drawing.
Now, say that a custom property is added or removed from a master, what/how
do I do to replace all the shapes in the drawing, which are copies of the
changed master, without doing it by-hand?

Is there any function or sub-routine in Visio 2002 Pro for this "update
visio drawing"-problem?

Any help is appreciated.

Thanks in advance
Martin
 
J

junethesecond

Do you wish to change a drawing open now only?
For a open drawing, i think you can do it, if you can make VBA macro, and
if the drawing-stencil is changed first.
 
M

Martin Englund

My idea was to change the stencil (the master), then look at all
document.shapes.name (in VBA) and see if the name coincides with the changed
master´s name, and if it does I cut all custom prop. temporarily, delete the
old shape, drop the new one and paste the cust.prop.
Do you think this will work or is there an "build-in" alternative in visio?
 
J

junethesecond

No. ..., look at the master in drawing stencil,
set master = document.masters("master´s name")
, change the custom property of shape in this master,
master.shapes(index), index=1, if master is a simple shape.
All the shapes coppied from same master in the stencil
, document.shapes(("master´s name" or (("master´s name.number"), will be
changed.
And then, if needed, look at all shapes in the drawing.
 

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