title: Automating reverse engineer database model with Visio
body: <p>We develop and maintain our database schema with a custom tool. SQL scripts and runtime files are generated from that tool. However, it does not provide a very good visual representation.</p>
  
  <p>Lately I been using Visio to reverse engineer the schema. This is working great so far. But to be able to do this, I need to:</p>
  
  <ol>
  <li>create an empty database</li>
  <li>execute the generated script</li>
  <li>start up visio</li>
  <li>choose reverse engineering and choose the created database</li>
  <li>select all tables, etc</li>
  <li>wait for generation</li>
  </ol>
  
  <p>I really want to automate this process. Step 1 and 2 are easy, but how can I automate the other steps.</p>
  
  <p>I've been looking for a C# library to create Visio diagrams, but they al seem not suitable for this task.</p>
  
  <p>For instance 
  <a href="http://visioautomation.codeplex.com/" rel="noreferrer">http://visioautomation.codeplex.com/</a> and <a href="http://www.graphviz.org/" rel="noreferrer">http://www.graphviz.org/</a> look promising, but on a closer look they were not appropriate.</p>
  
  <p>I've tried to record macro, but the macro recorder does not work in conjuction with the reverse engineering tools.</p>