SHARETHIS.addEntry({ title: "Visio and Xml Conference Resources", url: "http://www.visguy.com/2006/11/30/visio-and-xml-conference-resources/" });

" /> Visio Guy » Visio and Xml Conference Resources
Development

Tips & code for programming Visio & using the ShapeSheet

Maps & Geography

Maps & geography shapes & templates galore!

Network

Shapes & tools for Visio network diagrams.

News

Find out what’s new in the Visio world!

Shapes

Download useful & attractive Visio shapes. For free!

Home » Code, News

Visio and Xml Conference Resources

Submitted by Visio Guy on November 30, 2006 – 7:11 am | | 3640 views 10 Comments

Read Full ArticleBack in January 2006, I made a presentation at the Microsoft Office Visio Conference in Home-Sweet-Home Seattle. Good company, good information, and good fun was had by all! You can download plenty of excellent content from that conference, including PowerPoint slides and recorded presentations. Get it here: Visio Conference web site.

In my presentation, Working With Visio an Xml, our friend, Dr. Xml, proudly made his PowerPoint debut and won the crowd over. The presentation summary was…

Enhance the flexibility of your Visio solutions with XML. In this session you will learn how to use the Visio XML file format, how to store custom XML data islands in SolutionXML, and how to stream Shape XML elements to your drawings using the DataObject.

You can find my presentation’s materials on the Visio Conference web site page (just search the text for Chris Roth), or directly download the materials here:

I don’t think that the Microsoft downloads contain all the source code and demo files. You can download them here: (Download VisioXmlPresentation.zip 1.3MB)

10 Comments »

  • MattJ says:

    You’re a/v download link seems to be broken. Just thought I’d let you know.

  • Visio Guy says:

    Thank MattJ,

    No idea what went wrong, but it’s fixed now!

  • Chris Maloney says:

    Chris,

    I have built (and modified … converted to c#,etc) your sample code that uses a XML drawing and adds shapes and connectors to create a drawing using XML… very cool… only example of this I have seen anywhere… Thanks! I have the same issue you left in the example… Visio does not “layout” the connectors until I move a shape or use a “layout command”. Did you find a way to get Visio to layout the connectors when it opens the drawing?

    thanks,
    Chris M

  • [...] from the last Visio conference available for download, including the Visio Guy’s Visio-XML show (see: Visio and Xml Conference Resources) So even without the new stuff, there’s still lots of goodies from the last [...]

  • Hello,

    I’m trying to create a XML-drawing and everything seems to work fine, only the connectors are not displayed until you move one or more shapes. This is the same problem that Chris Maloney encounters and I was wondering if you already know of a solution. I do not use automation (XML-code is created from within a SQL Server DTS-package).

    Thanks,
    Martin Thiele

  • Visio Guy says:

    Hi Martin,

    I actually had this problem when I gave the presentation a few years ago, and still haven’t had the time to figure it out.

    I’ll ask around, see if any of the other Visio Geeks have figured it out. Kind of kills the whole “server-side document generation” thing, doesn’t it?

  • Visio Guy says:

    I found this post on Mai-Lan’s blog:

    http://blogs.msdn.com/mailant/archive/2004/10/26/248369.aspx

    It’s from 2004, so maybe they’ve changed something, but it recommends calling Layout on Open. Duh. Still not a solution, but maybe an answer…

  • Thanks for your quick reply! For the moment we’ve solved it by opening the diagram and flipping/unflipping each shape. This way the layout doesn’t change but it’s a fairly slow. Hope that we will find another solution in the near future.

  • Visio Guy says:

    Hi Martin,

    Have tried flipping/unflipping the whole drawing (page)?

    This little sub might do the trick a bit faster for you.

    Since those unrouted connectors are in the lower-left corner of your page, this code first draws a really long diagonal line from ( -pagewidth, -pageheight ) to ( 2 * pagewidth, 2* pageheight ) so that all objects on the page will be symmetrically encompassed by ’select all’. That way, when we do flip-x twice, the objects on the page won’t move.

    At any rate, this should work faster than flipping each individual shape…

    Sub FlipXmlPage()

    ‘// Get the page and the size of the page:
    Dim pg As Visio.Page
    Dim pw As Double, ph As Double

    Set pg = Visio.ActivePage
    pw = pg.PageSheet.Cells(”Width”).ResultIU
    ph = pg.PageSheet.Cells(”Height”).ResultIU

    ‘// Draw a big diagonal line to make all objects
    ‘// on the page symmetrical:
    Dim shpLine As Visio.Shape
    Set shpLine = pg.DrawLine(-pw, -ph, 2 * pw, 2 * ph)

    ‘// Flip everything on the page
    Dim sel As Visio.Selection
    Set sel = Visio.ActivePage.CreateSelection(Visio.VisSelectionTypes.visSelTypeAll)
    sel.Flip (Visio.VisFlipDirection.visFlipHorizontal)
    sel.Flip (Visio.VisFlipDirection.visFlipHorizontal)

    ‘// Get rid of the line:
    shpLine.Delete

    End Sub

  • Spending money on investing video conferencing system has saved me time and money by optimizing my business through video conferencing.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.