Visio 2010 Forward Engineer Add-in

2012/08/08

Somehow I missed this gem that’s been around for quite a while so I thought I would share it in case anyone else has yet to see it. The Forward Engineer add-in is a really great open source project that allows Visio database diagrams you create to easily be converted to T-SQL that will create physical objects in a SQL Server database for you.

If you’ve ever used Visio for visualizing existing databases into a diagram then you’ve likely used the standard Reverse Engineer option. The idea with the Forward Engineer add-in is exactly the opposite. Meaning it will create database object (script them out) from a Visio design.

This functionality previously existed in Visio 2003, if you had the Enterprise Architect version. Unfortunately, the feature was stripped out of the product after 2003 andAlberto Ferrari started this project to fill the gap. He’s stopped development on the project several years ago but you’ll still find the open source project available herehttp://forwardengineer.codeplex.com/.

When you download the tool you may have issues installing it like I did, but if you read the discussion page on the codeplex site it should guide you on how to maneuver around the problems. The project does not appear to be actively getting updated so there are a few things like this to deal with but it’s worth it!

After installing you get a new tab in the Office ribbon in Visio that’s fairly basic. The first button in the tab, Validate Data Model, will validate the data model before you create your script. The second button, Forward Engineer, does the real work and will generate a .sql file that will create all the objects in your Visio diagram for your SQL Server database.