AI Agent Hub
Back to skills
Local CAD Automation icon

Local CAD Automation

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_22ef1c90/cad-skills according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

This skill bridges the gap between a remote agent and a Windows workstation running CAD software. It turns user intent into JSON calls to a local skill_runner.py, which drives ZWCAD or AutoCAD for process control, drawing, annotation, layer handling, and document management.

How it works

  • Process control: use launch_app, close_app, is_app_running, and open_file_in_app to start, stop, inspect, or open CAD files.
  • Drawing and annotation: call zwcad_com with an action, such as draw_circle, draw_polyline, or add_dim_linear; highway-oriented actions include draw_centerline, draw_alignment, and draw_slope_line.
  • Layers and documents: support actions like add_layer, set_current_layer, new_doc, and save_as.
  • Fallback path: if the COM route is unavailable, use exec_cad_command to run SCR-script style commands.

Notes

  • The skill runs on a local Windows workstation and expects a Python environment with the pywin32 dependency; ZWCAD should be launched once as an administrator to complete COM registration.
  • The source material marks full COM automation primarily for ZWCAD and AutoCAD. Treat SolidWorks, CATIA, Creo, and Siemens NX as basic process or file-level targets rather than equivalent drawing APIs.
  • Advanced entity, block, selection set, and style operations should be checked directly in zwcad_com.py.

Use Cases

  • Start ZWCAD on a Windows workstation, open a specified DWG file, and check process status.
  • Draw centerlines, edge lines, and slope lines from point coordinates for highway engineering sheets.
  • Add linear, aligned, and radius dimensions, switch layers, and save the drawing as a new document.
  • Fall back to SCR command execution when COM is unavailable to run LISP or command-style operations.

Best For

  • Automation engineers who need to execute remote CAD instructions on a Windows desktop.
  • Highway drafting engineers who generate centerlines, edge lines, slope lines, and annotations in batches.
  • CAD application developers who drive local ZWCAD or AutoCAD through JSON actions for document management.
  • Technical operations staff who manage local CAD processes and query drawing status from a remote session.