Skip to content

Repository files navigation

VisioAutomation2 (Clipboard Flow Script � Visio Flowchart)

A small C# (.NET Framework) console tool that reads a simple "flow script" from your Windows clipboard and draws a flowchart in Microsoft Visio. It supports forks/merges by re-using nodes with the same label across multiple lines.

What it does

  • Attaches to an existing Visio instance if one is running, otherwise starts Visio.
  • Uses the currently open Visio document if one exists.
  • If no document is open, it creates a new document only if you pass a title argument.
  • Reads the flow definition from the clipboard.
  • Draws shapes and connectors on the active page.
  • Leaves Visio open so you can save the diagram manually.

Flow script format

The program reads plain text from the clipboard.

  • Each non-empty line is a chain of nodes separated by ->
  • Re-using the same node label across lines creates forks and merges

Example (fork)

Copy this into your clipboard:

Start -> Receive request -> Validate request
Validate request -> Approved -> Create work item -> Assign owner -> Do work -> QA review -> Deploy -> End
Validate request -> Rejected -> Notify requester -> End
QA review -> Needs changes -> Do work

Build requirements

  • Windows
  • Microsoft Visio installed (tested with Visio 16.x)
  • Visual Studio Build Tools / MSBuild
  • .NET Framework 4.7.2 (project targets v4.7.2)
  • COM reference: Microsoft.Office.Interop.Visio
  • Reference: System.Windows.Forms (for clipboard access)

Build

From the project folder:

msbuild /t:Rebuild VisioAutomation.csproj

Output will be in:

bin\Debug\VisioAutomation.exe

Run

If a Visio document is already open

bin\Debug\VisioAutomation.exe

If no Visio document is open (create new document requires a title)

bin\Debug\VisioAutomation.exe "My Diagram Title"

Notes / troubleshooting

“Clipboard is empty”

Copy a flow script (plain text) to the clipboard and run again.

“Could not open a Basic Flowchart stencil”

Your Visio install may not have the stencil under the name the tool tries to open (language/edition differences). The program tries several common stencil names. If it still fails, you may need to adjust the candidate stencil names in code or implement a “draw rectangle” fallback.

Layout

Current layout is simple:

  • each input line is started in its own “column”
  • nodes are placed vertically in that column
  • re-used node names are not re-positioned (so forks/merges may overlap depending on your script)

Custom Flowchart Script Language for Visio Automation

Overview

This is a simple, custom scripting language designed to describe flowcharts in plain text using arrow notation (->). The language allows you to define nodes and the connectors between them, including support for forks, merges, and nested structures.

This language is primarily designed for use with the VisioAutomation application we created, which interprets these scripts and generates corresponding diagrams in Microsoft Visio.


Does it handle forks?

Yes! The language and the current implementation support forks and merges naturally. When a node label appears in multiple lines or at multiple points, the application reuses that node shape, creating forked structures and merged paths.

Example of a fork & merge

Start -> ProcessA
ProcessA -> Decision
Decision -> Option1
Decision -> Option2
Option1 -> End
Option2 -> End

In this example, "Decision" splits into two paths—fork—and then both paths converge at "End" (merge).


Features

Reusing Nodes

  • When a node name is used multiple times across lines, it’s treated as the same shape.
  • This creates forks (one node with multiple outgoing edges) and merges (multiple paths leading into a single node).

Flexibility

  • Supports various flow structures: linear, forked, merged.
  • Nodes with the same label are automatically connected as the same shape.

How to Use

Creating a Script

  1. Write your flowchart as plain text, with each line representing a chain of nodes connected by ->.
  2. Copy the script to your clipboard.
  3. Run the VisioAutomation executable:
    • If a Visio document is open, it draws in that document.
    • If no document is open, pass a title argument to create a new one.

Running the Script

  • Just execute:
VisioAutomation.exe
  • To create a new document with a specific title:
VisioAutomation.exe "My Diagram"

Example Script (copy to clipboard)

Start -> Receive request -> Validate request
Validate request -> Approved -> Create work item -> Assign owner -> Do work -> QA review -> Deploy -> End
Validate request -> Rejected -> Notify requester -> End

Tips

  • Use meaningful labels for nodes.
  • Reuse labels to create forks and merges naturally.
  • Adjust the diagram manually afterward if needed.

Limitations

  • No support for nested conditional structures.
  • Layout is linear; manual tuning may be needed for complex diagrams.
  • Designed for quick sketching and basic flowcharts, not full programming logic.

Summary

This custom language makes it easy to define flowcharts in plain text with arrow notation, supporting forks and merges through node reuse. Write your chains with ->, reusing labels for shared nodes, and the application generates the diagram in Visio.

License

"This software is licensed under a proprietary license. Unauthorized copying, modification, or distribution is prohibited unless explicitly allowed by the creator and publisher."

About

LLm to flowchart extension for Commando OS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages