Visio: Programmatically creating an org chart from a simple text file

As a believer in the power of simple text formats, I wrote a tool to help make it easy to quickly draw org charts in visio by starting in notepad. It’s useful for more than “org charts” youcan use it to quickly render any simple hierarchical data.

Quick summary

  • The VisioAutoExt library now contains a command-line tool called MakeOrgChart

  • MakeFlowChart accepts simple indented text file draws an org chart based on the indentation level

Command-Line Usage

C:\>MakeOrgChart.exe d:\input1.txt

Example 1 – the input text file


Example 1 – the output drawing


Example 2 – the input text file

This example illustrates

  • a much larger orgchart

    • these org charts will tend to be very horizontal. you’ll have to use Visio’s org chart tools to re-layout sections to meet your needs

    • The larger these get, the longer it takes visio to draw them using its layout algorithm.

  • multiple roots nodes in the org chart

    • the drawing will compensate by adding a placeholder “ROOT” node, which you can manually delete

  • using the vertical bar character to add linebreaks in the the text

Charlie | President and CEO
    Tim | IT Manager
        Chris | Operations Engineer
        Simon | System Implementer
        Isaac | ISV Biz App Developer
        Mort | IT Systems Developer       
        Sean | Power User 
        Ivar | Inexp. VAR Sys Imp 

    Julia | Marketing Executive
        Kevin | Sales Manager
        Nicole | Marketing Staffer
        Benjamin | Marketing Manager
        David | Dedicated Sales Rep
        Michael | Account Manager 
        Susan | Order Processor 

    Marie | Cust. Serv Ops Mngr 
        Lisa | Cust. Service Rep 
        Daniel | Dispatcher 
        Rebecca | Receptionist/Admin 
        Terrence | Outbound Technician 
    Vince  | Operations Manager 
        Karl | Materials Manager 
        Ellen | Warehouse Manager 
        Inga | Purchasing Manager 
        Sammy | Shipping & Receiving 
        Alicia | Purchasing Agent 
        John | Warehouse Worker 
        Ted | Transportation Coord. 
        Tony | Production Manager 
        Lars | Shop Supervisor 
        Oscar | Process Engineer 
        Shannon | Machine Operator 
        Eduardo | Production Planner 
        Heather | Human Resources 
        Ricardo | Quality Assurance 
        Emil | Product Designer 
        June | Dir. of Prof. Services 
        Prakash | Project Manager 
        Reina | Resource Manager 
        Tricia | Project Team Member 
    Sara | CFO 
        Phyllis | Accounting Manager 
        Ken | Controller 
        Cassie | Accountant 
        Penny | Payroll 
        Arnie | Accounts Receivable 
        April | Accounts Payable 
        Annie | Bookkeeper 
        Connie | Credit & Collections Manager 
    Claire | HR Director / Manager 
        Brooke | HR Assistant 
        Grace | Training/Development Manager/ Specialist
        Jacob| Staffing Recruitment Manager/Specialist
        Jodi | Copensation and benifits Manger 
        Luke | HR Generalist

Stan |Small Business Owner 
    Debra | Office Manager 
    Lacy | Store Operations Mngr 
    Jeremy | Cashier 

Example 2  – the output drawing


Comments (0)