Posts

Chapter-3 Visio automation with Python-Code

  The Code Explanation In previous chapters we saw some codes which was able to draw some basic diagrams on the screen but i am sure when you guys implemented the same on your machine it shouldn't have worked. So Let's not waste time and start our discussion. Code Snippet-1 from hld_exp import Visio The above code must have been  giving you errors since Python on your machine didn't recognize a library name hld_exp. To be honest there is no such library as of now anywhere. I am working on a project with few motivated experienced engineers to develop such a library to automate MS Visio with Python and 'hld_exp' is the result of our work and we are going to talk about this library and it's functions. Which we can use to cater the requirement of custom Visio design. The hld_exp is based on win32com library to interact with COM object model and we will discuss about this in detail in our subsequent chapters. This is a code example taken from hld_exp and i would

Chapter-2- Visio automation with Python-Code

Image
Chapter-2 In chapter-1 we discussed on the relevant audience and available solution for Visio design, in this chapter we will see some code and it's output. Please don't get upset if below code doesn't work on your system. I would request you to keep your patience and continue your reading and you will learn how to make below code work. Example-1.0 from hld_exp import Visio visio = Visio () app = visio . open ( 'Visio' ) doc = visio . documents ( 'Basic Diagram.vst' ) stn = visio . stencils ( 'HP Devices updated.vssx' ) mstobj = visio . mastobj ( 'HP 5900 AF' ) page = visio . selectpage ( 1 ) coresw1 = visio . drawobject ( mstobj , 4.0 , 6.0 ) coresw2 = visio . drawobject ( mstobj , 8.0 , 6.0 ) active = visio . activedocument ().Masters( 1 ).Name contool1 = visio . connect () connect1 = page .Drop( contool1 , 0 , 0 ) connect2 = page .Drop( contool1 , 0 , 0 ) connect1 .Cells( 'BeginX' ).GlueTo( coresw1 .Cells( 'PinX&

Chapter-1 Visio automation with Python

Chapter-1 Introduction Since you have landed on this page I can assume you are looking for a solution with which you can automate the network diagram using Python. Relevant audience: 1. Anyone from Network, Security, or similar domain with knowledge of python. 2. Anyone who isn’t good or doesn’t have knowledge of Python can sign up for a course conducted by us.   In which we walk you through till you can automate a custom Diagram 3. If you are not from any of the domain mentioned in above point numbers, Let us know your domain and  requirements in comments we will come up with solutions which will suit your need   Solution There was a time once I was in same place as you are right now. After months of Googling I couldn’t find a concrete solution which could help in automating Visio diagrams. Then I took a project to develop a Python library which can help me to automate network diagram using Python and I am going  to discuss the same on this blog. The blog has just been sta