Load File in Visio Viewer

M

Michael

Hello,

On my website I used a Visio Custom Control from this article:
http://www.c-sharpcorner.com/UploadFile/scottlysle/CC_Visio01142007140634PM/CC_Visio.aspx

The control is working and I can load files from my webdirectory, but is it
also possible to load drawings from another directory on the server. Because
curretly it allows user to dowload the drawings
(www.website.com/drawings/drawing1.vsd).

What I want to do is to let the Control load the drawing from another
directory from the server, which is inaccessable to user who visit the
website.

I thought of trying to load maybe a byte[] into the control, but it doesnt
seem to have this function.

Could someone help me?

Thanks in advance,
Michael
 
D

David Parker

This is an extract from a shortly to be released document from Microsoft,
which should help you with the Visio Viewer control:

Visio Viewer
Viewer.SRC Property

Gets or sets the path to the source file for the drawing in the Microsoft
Office Visio Viewer 2007. Read/write.
Syntax

expression.SRC

expression An expression that returns a Viewer object.

Return Value
String

Remarks


To produce a viable diagram in the Viewer, the source file must be a Visio
drawing file (.vsd or .vdx). The file path may be to a URL as well as to a
local or networked file.

If the source file is a multi-page document, the Viewer displays the page
that was active the last time the file was saved in Visio, assuming that the
file was not subsequently modified outside of Visio. In that case, the
Viewer displays either the last active page or the first valid page.

If there is no document loaded in the Viewer, the SRC property returns a
null string (nothing).


Example


The following code sets a typical path to a source file in the Viewer.

Visual Basic for Applications
vsoViewer.SRC = "C:\users\Visio User\My Visio Drawing.vsd"


Michael said:
Hello,

On my website I used a Visio Custom Control from this article:
http://www.c-sharpcorner.com/UploadFile/scottlysle/CC_Visio01142007140634PM/CC_Visio.aspx

The control is working and I can load files from my webdirectory, but is
it
also possible to load drawings from another directory on the server.
Because
curretly it allows user to dowload the drawings
(www.website.com/drawings/drawing1.vsd).

What I want to do is to let the Control load the drawing from another
directory from the server, which is inaccessable to user who visit the
website.

I thought of trying to load maybe a byte[] into the control, but it doesnt
seem to have this function.

Could someone help me?

Thanks in advance,
Michael
 

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