# y1991427360s/zwcad-autolisp-tools architecture

> Architecture diagram of the GitHub repository y1991427360s/zwcad-autolisp-tools, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/y1991427360s/zwcad-autolisp-tools
- Repository: https://github.com/y1991427360s/zwcad-autolisp-tools

## Overview

ZW-auto_lisp is a ZWCAD 2026 productivity suite: users load its integrated AutoLISP program and invoke drawing commands, while an optional V6 extension adds Ribbon access and cross-CAD drawing-window management. The principal command set covers text/style editing, table and cable-schedule work, and drawing annotations. The separate window-manager workflow uses a CAD-side agent and a standalone manager over named pipes. The main LISP is self-contained; its internal features therefore share one source path. Details of unsampled LISP and V6 modules are limited to documented capabilities.

Main entry points: [`AA整合版本.lsp`](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp) (Font search), [`V6/AICADRibbon/WindowAgent.cs`](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/AICADRibbon/WindowAgent.cs) (CAD window agent), [`V6/WindowManager/ManagerProgram.cs`](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/ManagerProgram.cs) (Window manager), [`V6/AICADRibbon/AiRibbonPlugin.cs`](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/AICADRibbon/AiRibbonPlugin.cs) (Ribbon plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lisp["CAD commands"]
  node_main_lisp["Integrated commands<br/>[AA整合版本.lsp]"]
end

subgraph group_text["Text tools"]
  node_font_search["Font search<br/>[AA整合版本.lsp]"]
  node_font_dialog["Font dialog<br/>[ZTF.dcl]"]
  node_text_edit["Text editing<br/>[AA整合版本.lsp]"]
  node_attribute_edit["Attribute editing<br/>[AA整合版本.lsp]"]
  node_attribute_dialog["Attribute dialog<br/>[AAE.dcl]"]
end

subgraph group_drawing["Drawing tools"]
  node_table_tools["Table tools<br/>[AA整合版本.lsp]"]
  node_cable_register["Cable register<br/>[AA整合版本.lsp]"]
  node_schedule_merge["Schedule merge<br/>[AA整合版本.lsp]"]
  node_frame_allocate["Frame allocation<br/>[AA整合版本.lsp]"]
  node_cabinet_draw["Cabinet annotations<br/>[AA整合版本.lsp]"]
end

subgraph group_windows["Window manager"]
  node_window_agent["CAD window agent<br/>[WindowAgent.cs]"]
  node_wire_protocol["Pipe protocol<br/>[Protocol.cs]"]
  node_manager["Window manager<br/>[ManagerProgram.cs]"]
  node_notes[("Window notes<br/>[ManagerProgram.cs]")]
end

subgraph group_extension["CAD extension"]
  node_aicad_loader["AICAD loader"]
  node_aicad_extension["AICAD extension"]
  node_ribbon_plugin["Ribbon plugin<br/>[AiRibbonPlugin.cs]"]
end

node_user(("CAD user"))
node_zwcad["ZWCAD 2026"]

node_user -->|"uses"| node_zwcad
node_user -->|"loads and invokes"| node_main_lisp
node_main_lisp -->|"runs commands in"| node_zwcad
node_user -->|"invokes ZTF"| node_font_search
node_font_search -->|"shows interface"| node_font_dialog
node_font_search -->|"updates text styles"| node_zwcad
node_user -->|"invokes text commands"| node_text_edit
node_text_edit -->|"edits drawing text"| node_zwcad
node_user -->|"invokes AAE"| node_attribute_edit
node_attribute_edit -->|"shows interface"| node_attribute_dialog
node_attribute_edit -->|"edits block attributes"| node_zwcad
node_user -->|"invokes commands"| node_table_tools
node_table_tools -->|"modifies tables"| node_zwcad
node_user -->|"invokes XYG"| node_cable_register
node_cable_register -->|"creates register"| node_zwcad
node_user -->|"invokes HB"| node_schedule_merge
node_schedule_merge -->|"merges schedule rows"| node_zwcad
node_user -->|"invokes FDX"| node_frame_allocate
node_frame_allocate -->|"places text in frames"| node_zwcad
node_user -->|"invokes cabinet commands"| node_cabinet_draw
node_cabinet_draw -->|"draws annotations"| node_zwcad
node_user -->|"opens Ribbon tools"| node_ribbon_plugin
node_ribbon_plugin -.->|"provides window access"| node_window_agent
node_user -->|"opens DWGWIN"| node_manager
node_manager -->|"exchanges pipe messages"| node_wire_protocol
node_window_agent -->|"exchanges pipe messages"| node_wire_protocol
node_window_agent -->|"lists and controls drawings"| node_zwcad
node_manager -->|"stores notes"| node_notes
node_aicad_loader -.->|"loads extension"| node_aicad_extension

click node_main_lisp "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_font_search "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_font_dialog "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/ZTF.dcl"
click node_text_edit "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_attribute_edit "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_attribute_dialog "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AAE.dcl"
click node_table_tools "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_cable_register "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_schedule_merge "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_frame_allocate "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_cabinet_draw "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp"
click node_aicad_loader "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/aicad_aa_loader.lsp"
click node_aicad_extension "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/aicad_extension.lsp"
click node_ribbon_plugin "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/AICADRibbon/AiRibbonPlugin.cs"
click node_window_agent "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/AICADRibbon/WindowAgent.cs"
click node_wire_protocol "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/Protocol.cs"
click node_manager "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/ManagerProgram.cs"
click node_notes "https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/ManagerProgram.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_lisp,node_user toneBlue
class node_font_search,node_font_dialog,node_text_edit,node_attribute_edit,node_attribute_dialog toneAmber
class node_table_tools,node_cable_register,node_schedule_merge,node_frame_allocate,node_cabinet_draw toneMint
class node_window_agent,node_wire_protocol,node_manager,node_notes toneRose
class node_aicad_loader,node_aicad_extension,node_ribbon_plugin,node_zwcad toneIndigo
```

## Components

### CAD commands

- [Integrated commands](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`

### Text tools

- [Font search](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Font dialog](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/ZTF.dcl): `ZTF.dcl`
- [Text editing](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Attribute editing](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Attribute dialog](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AAE.dcl): `AAE.dcl`

### Drawing tools

- [Table tools](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Cable register](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Schedule merge](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Frame allocation](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`
- [Cabinet annotations](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/AA%E6%95%B4%E5%90%88%E7%89%88%E6%9C%AC.lsp): `AA整合版本.lsp`

### Window manager

- [CAD window agent](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/AICADRibbon/WindowAgent.cs): `V6/AICADRibbon/WindowAgent.cs`
- [Pipe protocol](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/Protocol.cs): `V6/WindowManager/Protocol.cs`
- [Window manager](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/ManagerProgram.cs): `V6/WindowManager/ManagerProgram.cs`
- [Window notes](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/WindowManager/ManagerProgram.cs): `V6/WindowManager/ManagerProgram.cs`

### CAD extension

- [AICAD loader](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/aicad_aa_loader.lsp): `V6/aicad_aa_loader.lsp`
- [AICAD extension](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/aicad_extension.lsp): `V6/aicad_extension.lsp`
- [Ribbon plugin](https://github.com/y1991427360s/zwcad-autolisp-tools/blob/main/V6/AICADRibbon/AiRibbonPlugin.cs): `V6/AICADRibbon/AiRibbonPlugin.cs`

### Other components

- **CAD user**
- **ZWCAD 2026**

## Connections

- CAD user → ZWCAD 2026: uses (evidence: `README.md`)
- CAD user → Integrated commands: loads and invokes (evidence: `README.md`)
- Integrated commands → ZWCAD 2026: runs commands in (evidence: `README.md`)
- CAD user → Font search: invokes ZTF (evidence: `README.md`)
- Font search → Font dialog: shows interface (evidence: `README.md`)
- Font search → ZWCAD 2026: updates text styles (evidence: `README.md`)
- CAD user → Text editing: invokes text commands (evidence: `README.md`)
- Text editing → ZWCAD 2026: edits drawing text (evidence: `README.md`)
- CAD user → Attribute editing: invokes AAE (evidence: `README.md`)
- Attribute editing → Attribute dialog: shows interface (evidence: `README.md`)
- Attribute editing → ZWCAD 2026: edits block attributes (evidence: `README.md`)
- CAD user → Table tools: invokes commands (evidence: `README.md`)
- Table tools → ZWCAD 2026: modifies tables (evidence: `README.md`)
- CAD user → Cable register: invokes XYG (evidence: `README.md`)
- Cable register → ZWCAD 2026: creates register (evidence: `README.md`)
- CAD user → Schedule merge: invokes HB (evidence: `README.md`)
- Schedule merge → ZWCAD 2026: merges schedule rows (evidence: `README.md`)
- CAD user → Frame allocation: invokes FDX (evidence: `README.md`)
- Frame allocation → ZWCAD 2026: places text in frames (evidence: `README.md`)
- CAD user → Cabinet annotations: invokes cabinet commands (evidence: `README.md`)
- Cabinet annotations → ZWCAD 2026: draws annotations (evidence: `README.md`)
- CAD user → Ribbon plugin: opens Ribbon tools (evidence: `README.md`)
- Ribbon plugin → CAD window agent: provides window access (evidence: `V6/AICADRibbon/AiRibbonPlugin.cs`)
- CAD user → Window manager: opens DWGWIN (evidence: `README.md`)
- Window manager → Pipe protocol: exchanges pipe messages (evidence: `V6/WindowManager/Protocol.cs`)
- CAD window agent → Pipe protocol: exchanges pipe messages (evidence: `V6/AICADRibbon/WindowAgent.cs`)
- CAD window agent → ZWCAD 2026: lists and controls drawings (evidence: `V6/AICADRibbon/WindowAgent.cs`)
- Window manager → Window notes: stores notes (evidence: `README.md`)
- AICAD loader → AICAD extension: loads extension
