Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Persisting Visio masters

Skip to first unread message


Apr 16, 2007, 1:38:39 AM4/16/07
I mean, I need to persist Visio masters outside of the Visio drawings,
and be able to drop those saved masters afterwards back to the
drawings. How do I do that?

How do I serialize/deserialize Visio master to/from a stream?
How this is implemented in ShapeStudio?

Paul Herber

Apr 16, 2007, 5:46:22 AM4/16/07

Look at XML in the Visio help and SDK.

Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio


Apr 16, 2007, 10:02:18 AM4/16/07
Paul, thank you for the response.

> Look at XML in the Visio help and SDK.

Please, can you be more concrete?
I know, XML and open formats are great, but what relation does it have
to my question..?

I do NOT want to generate masters/drawings with XML... this is NOT the
I want to persist already existing masters (created by users).
Just like the ShapeStudio does.
(it persists masters to the database, in table "Masters" as BLOBs)

How can XML help here?

Kind regards, Nikolay K. Belyh


Apr 21, 2007, 4:12:16 PM4/21/07
Just to let the community know that the subject is possible.
Namely, it is possible to store master/shape in a stream and then drop
it back to the document.
The way this can be implemented:

- Query master or shape you want to persist for IDataObject interface.
- Using this interface, obtain data blob in "Visio 11 Shapes/Visio 11
Masters" clipboard format (for Visio 2003).

Now this blob can be stored any way you want (database/memory/
To drop it back to the drawing, you can use "Drop" functions of visio
It turns out that these functions are happy enough with IDataObject
interface passed in.
So, to drop the stored master or shape back to the drawing:

- Create you own object that implements IDataObject interface.
- Pass this object in one of those "Drop" functions,
- When asked for the data, return your stored data blob in that visio

It works :)
But maybe there is an easier way to do all this stuff?

0 new messages