I need to include a Visio drawing into an empty window. Is it possible to do this?
In window forms (desktop applications) it’s possible by using the VisioViewer ActiveX.
Thank you in advance
the solution of a svg file isnt efficient since I need to allow navigation inside the visio document.
Moreover, each object of the document has decription information coming from an external database.
A solution that seems suits me is the following even if works with IE only:
I created an empty window. On this I putted inside an HTML panel associated with an html page with this code in the body:
<param name=”Src” value=”C:\visio\prova2.vsdx”>
This solution works well in case of little sized visio files. If i try to use a big visio file (i.e. 25 Mb) i cannot view it.
There is some correlation with the file size? Or, most probably, there is some important aspect i’m not considering?
Thank you again.
In addition to Tiago’s answer, Visio should be able to save to SVG or HTML. If you save to SVG you can assign the SVG file to a Wisej.Web.PictureBox controls.
If you still want to use the ActiveX viewer (IE only), add this to Web.config:
<system.webServer> ... <staticContent> <mimeMap fileExtension=".vsdx" mimeType="application/vnd.visio" /> </staticContent> </system.webServer>
Needed to serve vsdx files.
Then in a Wisej.Web.HtmlPanel add this HTML:
<object classid="clsid:279D6C9A-652E-4833-BEFC-312CA8887857" width="500px" height="500px"> <param name="BackColor" value="FFFFFFFF"> <param name="AlertsEnabled" value="0"> <param name="ContextMenuEnabled" value="1"> <param name="GridVisible" value="1"> <param name="HighQualityRender" value="1"> <param name="PageColor" value="16777215"> <param name="PageVisible" value="1"> <param name="PropertyDialogEnabled" value="1"> <param name="ScrollbarsVisible" value="0"> <param name="ToolbarVisible" value="1"> <param name="SRC" value="[Name of the vsdx file]"> <param name="CurrentPageIndex" value="1"> <param name="Zoom" value="-1"> </object>
The options are probably documented somewhere on MSDN. This is what I get in a Wisej sample app:
ActiveX is supported only by Internet Explorer (IE supports about all legacy stuff). I guess ActiveX isn’t a good choice.
There are free plugins/addins for Chrome and Firefx by https://www.lucidchart.com/ They also have free online Visio Viewer solutions. I don’t know how free they are but I guess that’s the best bet.