visio vb
Network topology using Visio 2007
Using visual diagrams of networks asset for management and maintenance can improve the stability and performance of enterprise networks as well as creating network design information base. But, keeping networks topology updated can be a frustrated task that involved in daily maintenance and human resources. Using Visio 2007 that integrates visual display with network topology database can make this task quite easy.
Integrating network topology database
There are some nice tools that can be found on the net that provides network and equipment topology. Some of them provide database exporting capabilities like Switch Center: Network Discovery and Mapping Monitor and Security Center: IDS IPS Network Access Protection. Using the Visio 2007 link data to shapes capability provides database information for diagram visual shapes including asset equipment and asset connectors. The Visio 2007 database link feature enables importing data information from several sources including Microsoft Access Database and SQL database. Those capabilities integrated with topology database create a complete network topology diagram that can be maintained and updated automatically using a simple script.
Visio database integration script
The following Visio 2007 database integration script visualize network components asset from selected database information and creates physical connections between them. For simplicity, the script is using Microsoft Access database or SQL database and two record sets one for the components shapes and one for the physical connectors which needs to be filled in using the appropriate query string of the selected database structure.
VBScript (should be copied and saved as .vbs file after modifying brackets information):
'Select database provider connect string
'Const dbProvider = "Driver={Microsoft Access Driver (*.mdb)};DBQ=[Database File (*.mdb)];"
'Const dbProvider = "{SQL Server};SERVER=[Server Name];DATABASE=[Database Name];"
'Add new visio page
Set visioApplication = WScript.CreateObject("Visio.Application")
Set visioPeriphDoc = visioApplication.Documents.Open("PERIPH_M.VSS")
Set visioDocument = visioApplication.Documents.Add("")
Set visioPage = visioDocument.Pages(1)
'Load database to visio
Set Shapes = visioDocument.DataRecordsets.Add(dbProvider, "[Database shapes query string]", 0, "Shapes")
Set Connectors = visioDocument.DataRecordsets.Add(dbProvider, "[Database connectors query string]", 0, "Connectors")
'Set shapes
shapesIndex = 0
ReDim shapesArray(shapesIndex)
Set server = visioPeriphDoc.Masters("Server")
Set shapesRecordset = visioDocument.DataRecordsets(1)
shapesIDs = shapesRecordset.GetDataRowIDs("")
For shapesRow = LBound(shapesIDs) + 1 To UBound(shapesIDs) + 1
Set shapesArray(shapesIndex) = visioPage.DropLinked(server, 0, 0, shapesRecordset.ID, shapesRow, False)
shapeData = shapesRecordset.GetRowData(shapesRow)
shapesArray(shapesIndex).Text = shapeData(0)
shapesIndex = shapesIndex + 1
ReDim Preserve shapesArray(shapesIndex)
Next
'Set connectors
Set connectorsRecordset = visioDocument.DataRecordsets(2)
connectorsIDs = connectorsRecordset.GetDataRowIDs("")
For connectorsRow = LBound(connectorsIDs) + 1 To UBound(connectorsIDs) + 1
connectorData = connectorsRecordset.GetRowData(connectorsRow)
Set connector = visioPage.Drop(visioApplication.ConnectorToolDataObject, 1, 1)
connector.Text = connectorData(0)
childIndex = 0 'Search appropriate index from shapes array
parentIndex = 0 'Search appropriate index from shapes array
Set parentConnector = shapesArray(parentIndex).Cells("Connections.X1")
Set childConnector = shapesArray(childIndex).Cells("Connections.X1")
connector.Cells("BeginX").GlueTo parentConnector
connector.Cells("EndX").GlueTo childConnector
shapesArray(parentIndex).BringToFront
shapesArray(childIndex).BringToFront
Next
'Set layout
visioApplication.ActiveWindow.DeselectAll
visioPeriphDoc.Close
visioPage.Layout
About the Author
For more information on network security and management software solutions for real-time monitoring systems, please visit Lan-Secure.com: Network Management Software.
![]() |
VIZIO VSB200 Universal HD Sound Bar List Price: $99.99 Sale Price: $88.05 Used From: $57.49 |
|
Designed for home theater enthusiasts, this Sound Bar includes cutting edge sound technologies such as SRS TruSurroundHD for an enveloping sound experience and features such as four 3” high efficiency hand built mid/bass transducers and two 3/4” high performance aluminum dome neodymium tweeters... |
![]() |
iKross Bluetooth Wireless Silicone Keyboard for HP TouchPad, Acer Iconia A500, Samsung Galaxy Tab 7 inch/10.1 inch Verizon LTE 4G, Asus Eee Pad Transformer TF101, Motorola Xoom, Toshiba Thrive, iPad 1 , 2 & 3 The New iPad , ViewSonic gTablet, Dell Streak 7, Asus, ipad 3 (the new ipad) 2012 version, Samsung Galaxy Tab 2 List Price: $39.99 Sale Price: $25.99 |
|
Bluetooth Wireless Foldable Silicone Keyboard Brand new bluetooth wireless keyboard. Foldable design allows you to carry anywhere. Small, light, and easy to store. Waterproof and easy to clean. Keyboard is powered by built-in rechargeable battery... |
![]() |
VIZIO 3D Blu-ray player with Wireless Internet Apps, VBR333 List Price: $159.99 Sale Price: $129.99 Used From: $105.85 |
|
VIZIO brings you the ultimate movie experience! This 3D Blu-ray Player with Wireless Internet Apps unlocks a new dimension with breathtaking, crystal-clear Full HD 3D. With up to 7.1 channels of digital surround sound and 100 percent lossless audio produced by Dolby TrueHD and DTS HD, you will feel like you are in the middle of the action... |
![]() |
Sony VAIO VGP-AC19V10 Notebook PC AC Adapter (Retail Packaging) List Price: $89.99 Sale Price: $13.95 Used From: $9.95 |
|
Sony VAIO VGP-AC19V10 Notebook PC AC Adapter: Sony's worldwide estimation for creating unequalled captivating high-quality modern profession products rests on a daylong distinction of innovations embraced by grouping from every walks of life... |
![]() |
VIZIO VBR210 Blu-Ray Player with Wireless Internet Application, Black List Price: $139.99 Sale Price: $123.95 Used From: $119.95 |
|
The VIZIO VBR210 Blu-Ray Player with Wireless Internet Apps delivers full 1080p high-definition video, 7.1 surround sound and connects wirelessly to the Internet to stream movies, TV shows, music and more. |
![]() |
Archos 3 Vision 8 GB Video MP3 Player (Chocolate Brown) List Price: $99.99 Sale Price: $99.99 Used From: $76.68 |
|
The ARCHOS 3 vision media player is a full-featured, affordable media player packed with a bright and sharp 3-inch LCD touchscreen, 8 GB of storage, and an FM transmitter. Just the ticket for making all your photos, music, and videos, truly portable... |
![]() |
VIZIO VBR220 Blu-ray Disc Player with Wireless Internet Applications, Black List Price: $139.99 Used From: $99.23 |
|
The VIZIO VBR220 Blu-ray Player with Wireless Internet Apps delivers full 1080p high-definition video, 7.1 surround sound and connects wirelessly to the Internet to stream movies, TV shows, music and more... |







