Customizing the document loading process

R

Ralph Spaulding

I'm building an application that displays Visio documents in anActiveX
control. I want to have better control over how documents are loaded, both
from a document management perspective and from a performance perspective.

1. I want to be able to store documents in a central repository (perhaps a
database), and then let clients load them across the network without
requiring shared file access. I can take care of transporting the bytes of a
document, but then I want to load it from a byte stream instead of having to
read an actual file. I suppose I could transport the bytes across the
network and write them to a file, but I'm concerned about performance (see #2
below).

2. I need to be able to load documents very quickly. I need complex
documents (200 K and up) to load in 2-3 seconds. Is there a binary format
that can be used to map documents into memory very quickly? How would I use
the API to access documents stored in such a format?

The current API just allows the DrawingControl.Src property which must refer
to an actual file on disk. I need more control than that.

Thanks,
Ralph
 
C

Chris Roth [MVP]

Ralph,

Although I haven't personally investigated this, I've heard from others that
you *have* to load the control using the.SRC property, which points to a
file.

So, you could either:

- Save a tmp.vsd file from your stream and load it. Once it's loaded,
tmp.vsd isn't needed any more, because the control always loads copies.
- Get Visio xml from your database and drop the entire document-xml on/into
a blank document which is already loaded. You use a DataObject to do this,
and I believe the process can be found either in one of two places:

- Visio Dev Conference 2005 materials from my talk on xml:
http://www.visioconferencecontent.com/

- Graham Wideman's book: "Visio 2003 Developer's Survival Guide"
http://www.amazon.com/gp/redirect.h...-Developers/dp/1412011124/ref=sr_11_1?ie=UTF8


--
Hope this helps,

Chris Roth
Visio MVP

www.wanderkind.com/visio
 

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