This post has been republished via RSS; it originally appeared at: Visio Blogs Archive articles.First published on MSDN on May, 03 2011
The video below shows how to add a Data Graphic legend to a drawing using C# code. How might you use this code within the context of constructing diagrams with Data Graphics?
As mentioned in a previous blog post , Visio Professional 2010 and Visio Premium 2010 use container shapes to create legends for data graphics. Along with this new feature, the Visio 2010 Object Model includes new APIs that allow you to manipulate container shapes programmatically – including the Page.DropLegend method that allows you to add a Data Graphics legend to your drawing using code.
We’ve created this how-to video about using C# to add a Data Graphics legend to a drawing page. While creating this video, we considered some of the larger scenarios where this API might be used. We’d like some feedback from you, the Visio developers and users, to learn more about how you use these features:
· Which templates do you use most frequently to represent external data?
· When you link a drawing to external data, which data providers do you most commonly connect to (e.g. Excel, Access, SharePoint lists, SQL Server, etc.)?
· What other tasks do you frequently perform in addition to linking a drawing to external data?
· How often do you use code to manipulate external data in Visio, using VBA, C#, or VB.NET? Have you ever applied data graphics to a Visio diagram using code ?
Please watch the video and submit your feedback using the comment box below this post.
Note: The Data Graphics legend feature is only available in Visio Professional 2010 and Visio Premium 2010.