Visual Studio provides project templates you can use to create VSTO Add-ins for Microsoft Office Visio. You can use VSTO Add-ins to automate Visio, extend Visio features, or customize the Visio user interface (UI).
For more information about VSTO Add-ins, see Getting Started Programming VSTO Add-ins and Architecture of VSTO Add-ins. If you are new to programming with Microsoft Office, see Getting Started (Office Development in Visual Studio).
Applies to: The information in this topic applies to VSTO Add-in projects for Visio 2010. For more information, see Features Available by Office Application and Project Type.
The Visio object model exposes many classes that you can use to automate Visio to create diagrams for organizational charts, flowcharts, project timelines, network diagrams, office spaces, and more. The API enables you to write code to accomplish common tasks:
Construct and position shapes and text in diagrams.
Manage shape behavior based on business logic and user input.
Control diagram visualization such as panning and zooming.
Customize the application UI.
Import external data into Visio, link it to shapes, and display it graphically on a page.
To access the Visio object model from a VSTO Add-in, use the Application field of the ThisAddIn class in your project. The Application field returns a Microsoft.Office.Interop.Visio.Application object that represents the current instance of Visio. For more information, see Programming VSTO Add-Ins.
When you call into the Visio object model, you use types that are provided in the primary interop assembly (PIA) for Visio. The PIA acts as a bridge between the managed code in the VSTO Add-in and the COM object model in Visio. All types in the Visio PIA are defined in the Microsoft.Office.Interop.Visio namespace. For more information about primary interop assemblies, see Office Solutions Development Overview (VSTO) and Office Primary Interop Assemblies.
You can find an overview of the Visio object model at Visio Object Model Overview, which includes links to the Visio object model reference and the SDKs.
Getting Started Programming VSTO Add-ins
Office Solutions Development Overview (VSTO)
Architecture of VSTO Add-ins
How to: Create Office Projects in Visual Studio
Programming VSTO Add-Ins
Writing Code in Office Solutions
Office Primary Interop Assemblies
Office UI Customization
Visio Object Model Overview
Visio 2010 in Office Development