D
David LACASSAGNE
Hello,
I generate Visio drawings from an Access DB with the following
process:
1-Generate a Temporary directory for each drawing
2-Copy Stencil file to the temporary directory of step 2
3-Open Stencil file with Visio, change masters caption with DB
contents, save it and close
4-Generate a Visio drawing by automation from DB contents using drop
operations from the stencil file.
So, if I generate 2 drawings, they are based on 2 different stencil
files (masters have the same BaseID, but different UniqueID).
Let's take the following sample:
- Drawing1 is composed of Shape1 based on the master named MASTER
(from Stencil1)
- Drawing2 is composed of Shape2 based on the master named MASTER
(from Stencil2)
MASTER has the 'Match master by name' property set to True.
So, when I drag MASTER from Stencil1 To Drawing2, I get Shape3 that is
based on MASTER.
But If I copy Shape1 and paste it to Drawing2, I get Shape4 that is
based on a new master (added to the Drawing2 document stencil) called
MASTER.2
Is there a way to avoid this new master creation ? Or in the
SelectionAdded event, a way to change the Shape4 master and then
destroy MASTER.2 ?
Thanks in advance,
David.
I generate Visio drawings from an Access DB with the following
process:
1-Generate a Temporary directory for each drawing
2-Copy Stencil file to the temporary directory of step 2
3-Open Stencil file with Visio, change masters caption with DB
contents, save it and close
4-Generate a Visio drawing by automation from DB contents using drop
operations from the stencil file.
So, if I generate 2 drawings, they are based on 2 different stencil
files (masters have the same BaseID, but different UniqueID).
Let's take the following sample:
- Drawing1 is composed of Shape1 based on the master named MASTER
(from Stencil1)
- Drawing2 is composed of Shape2 based on the master named MASTER
(from Stencil2)
MASTER has the 'Match master by name' property set to True.
So, when I drag MASTER from Stencil1 To Drawing2, I get Shape3 that is
based on MASTER.
But If I copy Shape1 and paste it to Drawing2, I get Shape4 that is
based on a new master (added to the Drawing2 document stencil) called
MASTER.2
Is there a way to avoid this new master creation ? Or in the
SelectionAdded event, a way to change the Shape4 master and then
destroy MASTER.2 ?
Thanks in advance,
David.