Hi everybody,
I am trying to dynamically create a set of masters on a stencil, but having a few hitches. Can anyone point out where I'm going wrong here?
1. I get hold of a master from a separate stencil:
Visio.Master shpMst=VisioApp.Documents["Basic Shapes.vss"].Masters["Rectangle"];
2. Attempting to rename it throws a "Requested operation is presently disabled." exception:
shpMst.Name = "New Rectangle"; // exception!
3. The following code adds the Rectangle to the stencil, but throws a "cannot create object" exception:
VisioApp.Documents["MyStencil.vss"].Drop(shpMst,0,0);
Any suggestions gratefully received!
Kind regards,
Philip
I am trying to dynamically create a set of masters on a stencil, but having a few hitches. Can anyone point out where I'm going wrong here?
1. I get hold of a master from a separate stencil:
Visio.Master shpMst=VisioApp.Documents["Basic Shapes.vss"].Masters["Rectangle"];
2. Attempting to rename it throws a "Requested operation is presently disabled." exception:
shpMst.Name = "New Rectangle"; // exception!
3. The following code adds the Rectangle to the stencil, but throws a "cannot create object" exception:
VisioApp.Documents["MyStencil.vss"].Drop(shpMst,0,0);
Any suggestions gratefully received!
Kind regards,
Philip