Solved

Exporting Details of Servers into Visio Drawing

Posted on 2011-02-20
4
821 Views
Last Modified: 2012-05-11
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

0
Comment
Question by:chongbenkee
  • 2
  • 2
4 Comments
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 34942960
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
 

Author Comment

by:chongbenkee
ID: 34948035
A very useful piece of information .Thanks Scott. But do you have any simple macro that we can try on ?


0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 34955118
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
 

Author Closing Comment

by:chongbenkee
ID: 35146333
thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Please see preceding article here: http://www.experts-exchange.com/Networking/Operating_Systems/A_11209-Root-Bridge-Election.html Figure 1 After Root Bridge has been elected, then what?..... Let's start by defining a Root Port in la…
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now