How can I open stencil-files (.vss) in Visio-ActiveX?

M

Mr Anderson

When I have an empty drawing in my Visio-ActiveX (drawing control), how can I
open some stencil-files (*.vss) too? Is there a method, which can do this?
 
L

LarryF

To open a stencil:
string fileName = "Some Stencil.vss"; // You don't need a path if the
stencil is in one of Visio's stencil search paths.
Visio.Application app = <some initialization>;
app.Documents.OpenEx(fileName, (short)(Visio.VisOpenSaveArgs.visOpenRO
| Visio.VisOpenSaveArgs.visOpenHidden));

Then the stencil is available for use like this:
Visio.Document visStencil = app.Documents[fileName];
Visio.Master visMaster = visStencil.Masters[master];
Visio.Shape shape = page.Drop(visMaster, X, Y);
 

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