Drawing Visio Diagrams: Generating Editable .vsdx Document Illustrations via COM Automation on Windows

# Introduction

There are three common approaches to handling flowcharts in Word delivery documents: pasting screenshots (which the recipient cannot modify), inserting AI-generated SVGs/PNGs (where font sizes don’t align with the rest of the document), or manually drawing in Visio (which can take a whole day to arrange a single diagram). The first two methods do not yield editable original images, while the latter incurs high costs.

The “Draw Visio Diagram” Skill takes a different path: it directly drives the locally installed Microsoft Visio to draw native shapes via COM automation, producing deliverable and editable .vsdx files. It also formats the layout according to the final width the diagram will occupy in the document. Below, we introduce what it is, what it can do, and how to use it.

# What is This

One-sentence positioning: It automatically generates and formats diagrams on a local Windows Visio instance, directly producing original .vsdx files ready to be inserted into Word.

Published and maintained by SkillHub community user user_21c8292a (Coordinates: @user_21c8292a/serenevista), the current version is 1.0.2, categorized under office-efficiency. The SkillHub page displays a rating of 100000 and 1301 downloads. It solves a very specific problem: formal documents require consistent font sizes and whitespace throughout; illustrations must be editable, formatted to the delivery width, and allow for a layout self-check before output.

# Core Functions

Based on the verified official description, there are four key capabilities:

  1. COM Automation for Native Shapes: It does not use image conversion as an intermediary. Instead, it directly calls the local Visio COM interface to draw shapes, producing .vsdx source files that recipients can edit directly.
  2. Layout by Delivery Width: Formatting is based on the final width the image will occupy in the document. The width and height of each box are automatically calculated based on the amount of text inside, eliminating the need for manual adjustment.
  3. 15-Point Automated Layout Check: It runs 15 layout checks in memory before generating the diagram and issues a report/receipt for item-by-item verification.
  4. Bitmap Reference Reconstruction: It redraws diagrams based on a bitmap (screenshot, photo, or old image)—first using PIL to measure the actual coordinates of boxes and connectors from the pixels, then re-formatting them according to the delivery width.

Covered Diagram Types: Flowcharts, use case diagrams, swimlane diagrams, E-R diagrams, functional composition diagrams, architecture diagrams, and other document illustrations.

Official Trigger Words: Visio, vsdx, Visio source file, editable flowchart, editable original image, document illustration, generate diagram, layout diagram, draw based on image, redraw based on this image, image to Visio, screenshot redraw, reference reconstruction. You can invoke it by saying these words in the client.

# Installation and Activation

Official Address:

https://api.skillhub.cn/user_21c8292a/serenevista
SkillHub Page: https://www.skillhub.cn/skills/user_21c8292a/serenevista
Coordinates: @user_21c8292a/serenevista

The materials do not provide specific installation commands; please obtain it from SkillHub using the addresses and coordinates above. This Skill is marked with requires_api_key=false, so no additional API key application is needed. It is based on the general SKILL.md format and is enabled in clients that support this format; however, the activation methods for different clients (Cursor / Codex CLI / Claude Code) could not be verified from the materials, so they will not be detailed here.

Confirm the environment before enabling: Windows operating system with Microsoft Visio installed locally. This is a strict prerequisite; the materials explicitly state there is no fallback route—it cannot be used without Visio installed.

# Typical Usage

The official materials provide capability descriptions but no copy-paste example code. Below are the reproducible operations based on the two paths described in the introduction.

Path 1: Generating from a Description

  1. Invoke via trigger words in the client, e.g., “Generate an architecture diagram, formatted to 15 cm width.”
  2. The Skill creates native shapes in local Visio via COM automation; box dimensions are calculated based on text volume.
  3. It runs 15 automated layout checks in memory before output and issues a report.
  4. It produces a .vsdx file, which can be inserted directly into the Word delivery document, with font sizes and whitespace aligned to the delivery width.

Path 2: Reconstructing from a Bitmap

  1. Provide a reference image (screenshot, photo, or old image).
  2. The Skill first uses PIL to measure the actual coordinates of each box and connector from the pixels.
  3. It re-formats these boxes and lines according to the target delivery width.
  4. It uses COM automation to produce a native .vsdx, runs the automated checks, and issues a report.

# Applicable Scenarios & Notes

Who it is for:

  • Authors of formal and design documents that require insertion into Word deliverables and demand consistent font sizes and whitespace throughout.
  • Teams that need to deliver editable original images so recipients can modify them themselves.
  • People who only have old screenshots and need to reformat them to a new width.

Limitations and Pitfalls:

  • Strict Prerequisite: It requires Windows with Microsoft Visio installed locally. There is no fallback route for environments without Visio; verify this before selecting the Skill.
  • Automated Checks: The Skill issues a report after automated checks. You should review the report before delivery rather than assuming the output is qualified by default.
  • Reference Reconstruction: This feature relies on PIL pixel measurement. Blurriness or distortion in the original photo will propagate to the coordinates. It is recommended to manually review complex old diagrams after reconstruction.
  • Community Source: This Skill comes from the community. The current installation count is 0. You may want to check the SkillHub page for update status before adopting it.

# Conclusion

The value of “Draw Visio Diagram” lies in turning manual Visio drawing into a repeatable pipeline: COM automation for native shapes, layout by delivery width, pre-output automated checks, and support for bitmap reconstruction. It does not shy away from the hard prerequisite—Windows + Visio is mandatory—making it suitable for delivery scenarios where the environment is confirmed and document illustrations require editability and consistency throughout the document.

Official Address: https://api.skillhub.cn/user_21c8292a/serenevista

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye