Exporting Details of Servers into Visio Drawing

Hi ;

Is there any tools, scripts or method that i can used to import SQL db into Visio files?

Here's the scenario . I have a database that consist of server names which I wanted to export into diagram in Visio format . The database will feed the Visio file each time new data is inserted.
For now, i'm thinking of doing this way :-

1) Any new data entry to the SQL(specific table) , it will export it to a flat file. For these , what will be the SQL statement to use ?
2) From this flat file , it will feed to a VSD file that will automatically generate a diagram based on the input.Is this possible ?

Thx

chongbenkeeAsked:
Who is Participating?
 
Scott HelmersConnect With a Mentor Visio Consultant, Trainer, Author, and DeveloperCommented:
Here's an article from the excellent Visio Guy web site:
   http://www.visguy.com/2006/09/13/create-visio-flowcharts-programmatically/
As Chris (the Visio Guy) states, it's not the simplest code, but it works as he describes.

I've also attached sample code that creates shapes on the page by reading data from the External Data window. (Visio creates the External Data window when you use data linking to connect your drawing to an external data source. Consequently, this diagram is what your data would look like after linking to SQL.) To try the code, just open the drawing and execute the macro. (Note: data linking does require the Professional version of Visio as I mention in my initial post.)

Create-and-arrange-text-boxes-ba.vsd
0
 
Scott HelmersVisio Consultant, Trainer, Author, and DeveloperCommented:
Getting data from SQL to Visio is pretty easy if you have the right version of Visio, and it doesn't require creating an intermediate file. The following versions of Visio can read data directly from SQL and many other data sources:
-- Visio 2007 Professional
-- Visio 2010 Professional
-- Visio 2010 Premium

It is possible to get data into other versions of Visio, but it's a lot more work.

Here are four tutorials on data linking, and it's companion feature, data graphics:
-- http://office.microsoft.com/en-us/training/redir/RZ010197743.aspx
-- http://office.microsoft.com/en-us/training/link-data-to-diagrams-ii-data-graphics-RZ010197933.aspx
-- http://office.microsoft.com/en-us/training/link-data-to-diagrams-iii-position-your-data-graphics-RZ010198161.aspx
-- http://office.microsoft.com/en-us/training/link-data-to-diagrams-iv-link-data-automatically-RZ010198195.aspx
It's the first and last that are specifically about data linking.

Each of the links above leads to a recorded tutorial. If you'd like one page with printed instructions, try this one:
-- http://office.microsoft.com/en-us/visio/HA100487831033.aspx?pid=CH100991461033   

As far as placing shapes on the page, Visio doesn't do that for you automatically. It's possible to write a macro to accomplish that, although the macro can range from quite simple to very complex depending on your data and what you want the map to look like.

Another place to look: go to http://visiotoolbox.com/2010/ and click the tab for "Visio for Managing IT" in the center of the page. This will give you some ideas about what Visio 2010 can do out of the box. On the same site there are Visio partner companies that offer Visio add-ins that do create network maps automatically. You'll find several here: http://visiotoolbox.com/2010/partner-product-trials.aspx
0
 
chongbenkeeAuthor Commented:
A very useful piece of information .Thanks Scott. But do you have any simple macro that we can try on ?


0
 
chongbenkeeAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.