Hello!
I want to create a Visio drawing on the IIS server, and then exposing it
to the client, in a Visio content type.
I use the Visio type library for creating the drawing in a .cs or .vb
file behind an aspx.
In certain points of the program - when dropping a shape from a master,
or when adding a new page to an existing document - the server hangs, the
Visio.exe instance remains loaded in the memory, and nothing happens.
The same code works fine if I run it from a Windows Forms application.
So my question is: how can I use all the features of Visio type library
from a Web application?
This is what I do (simplified a lot):
Dim visApp As Visio.InvisibleAppClass
Dim visDoc As Visio.DocumentClass
Dim visPage As Visio.PageClass
Dim visMaster As Visio.MasterClass
Dim visShape As Visio.ShapeClass
visApp = New Visio.InvisibleAppClass()
visDoc = visApp.Documents.Add("Organization Chart (US units).vst")
visPage = visDoc.Pages.Item(1)
visMaster = visDoc.Masters("Executive")
visShape = visPage.Drop(visMaster, 1, 1) 'HERE IT HANGS!!!!
visDoc.SaveAs("c:\work\visio\test.vsd")
visApp.Quit()
Thanks in advance.