Master Swapping in Visio 2003

E

emel

When I drop a revised master from a stencil file into a document, I'd like to
replace the local master in the document and relink instances from the old to
the new master.

My document includes a master shape, Blob, with many Blob instances
throughout the document. Master Blob, in turn, is a copy from a .vss stencil
file. I've added code to fiddle with master Blob's actions in the
shapesheet. The instances all inherit the changes as if by magic. Works
great as long as all my little bloblets share the same master.

But, if I make any change to Blob in the .vss file and then drop instances
in my document, it adds a second master, Blob.1, and creates a new set of
instances from there. I can unlink the old instances from the old master by
deleting the old master. I haven't been able to figure out how to relink the
instances to the new master short of selecting all of them and recreating
from scratch, which is tedious.

For example, is there a collection of instances linked to a master that I
can .add shapes to? I've tried quite a few things to make this happen.

<master>.MatchByName is close, but backwards. I'd like to apply the
stencil master properties to the local master rather than the other way
around.

<object>.createsselection (visSelTypeByMaster,,Blob) let's me find all the
little bloblets but doesn't help me relink them once I know who they are.

<shape>.master and <shape>.containingmaster seem to be read only.

..drop-ping shapes into Blob.1 was entertaining but not useful.

I hope I'm missing something simple.

Thanks in advance,

Ed
 
D

David Parker

It is not simple ...
Visio master shape instances inherit lots of stuff from the local master
shape.
You would be best advised to update the local master shape either manually
or in code.
 
E

emel

Thank you. I was afraid that was the situation.

..matchbyname may have to suffice for now - just to avoid having multiple
local versions of a .vss master in any .vsd. Folks that are desperate for
the latest blob master will have to export and re-import. At least those
routines are written and working - but it's a non-obvious step for the poor
users.

Ed
 

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