autocad-tianzheng-hvac
Use when controlling AutoCAD 2026 with Tianzheng HVAC T30 through the autocad_tianzheng MCP server, including connecting the THvac30V1 profile, reading or creating DWG engineering files, scanning layers/entities/blocks/text into SQLite/JSON/XLSX, running Tianzheng HVAC commands, loading Tianzheng ARX modules, or diagnosing Tangent path issues.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- autocad-tianzheng-hvac
- description
- Use when controlling AutoCAD 2026 with Tianzheng HVAC T30 through the autocad_tianzheng MCP server, including connecting the THvac30V1 profile, reading or creating DWG engineering files, scanning layers/entities/blocks/text into SQLite/JSON/XLSX, running Tianzheng HVAC commands, loading Tianzheng ARX modules, or diagnosing Tangent path issues.
02 资源文件 1
- 参考文档agents/openai.yaml149 B
03 SKILL.md 正文
AutoCAD 2026 + 天正暖通 HVAC
适用范围
用这个 skill 处理本机 AutoCAD 2026 + 天正暖通 T30V1 的连接、读图、建图、保存、导出和排障。默认 MCP server 是 autocad_tianzheng;在 Codex 设置页的 MCP servers 里,它显示在 "From plugins" 列表下,不一定出现在手动 "Servers" 列表里。
机器相关路径从环境变量读取:
- AutoCAD:
AUTOCAD_EXE,例如<AutoCAD 2026 install>\acad.exe - 天正暖通根目录:
TIANZHENG_ROOT,例如<Tangent THvacT30V1 root> - 天正 profile:
THvac30V1 - COM 自动化 profile:
CodexAutomation - AutoCAD 2026 COM ProgID:
AutoCAD.Application.25.1 - MCP 工程:
AUTOCAD_TIANZHENG_MCP_ROOT,指向本机multiCAD-mcp工作树 - Python 解释器:
AUTOCAD_TIANZHENG_PYTHON,可选;未设置时使用当前环境里的python - 默认输出: 优先放在 MCP 工程外的用户指定工作目录;不要写入插件仓库
标准连接流程
- 先连接指定 CAD 类型,不要依赖自动探测。稳定自动化模式通过
CodexAutomation启动干净 AutoCAD 2026;如果用户已手动打开天正,则可只附加当前运行会话。
[{"action":"connect","cad_type":"tianzheng_hvac"}]
把上面的 JSON 字符串传给 manage_session。
- 连接后立刻探测天正状态:
[{"action":"probe"}]
把上面的 JSON 字符串传给 manage_tianzheng。重点看 current_profile、tangent_root_exists、missing_paths、support_path、trusted_paths 和三个 ARX 文件是否存在。
常见正常状态:
- 用户手动打开天正时,
current_profile通常是THvac30V1 - Codex 自动化冷启动时,
current_profile通常是CodexAutomation
- 做天正命令前再显式加载暖通 ARX:
[{"action":"load_arx"}]
默认加载 Tch_HvacCmd.arx、Tch_PipeBase.arx、tch_pipewire.arx。不要把 auto_load_arx 改成默认开启;历史上自动加载天正核心 ARX 可能触发 AutoCAD 崩溃。
读图与索引
读取工程图时先用普通 CAD 工具查询图层、块、实体,再用天正索引补充可检索数据。扫描 ModelSpace 到 SQLite:
[{
"action":"scan_index",
"db_path":"<output-root>\\index\\autocad_tianzheng_index.sqlite",
"json_path":"<output-root>\\index\\autocad_tianzheng_index.json",
"xlsx_path":"<output-root>\\index\\autocad_tianzheng_index.xlsx"
}]
索引内容包括图纸路径、实体 handle、对象类型、图层、颜色、线型、文字、块名/名称、坐标 JSON。需要追溯对象时优先用 handle。
建图与保存
新建图纸先调用 manage_files 的 new,再用 draw_entities 画基础实体和文字。保存用绝对路径:
save|<output-root>\drawings\smoke_autocad_tianzheng.dwg
复杂工程文件优先分层创建:轴网/墙体/风管/水管/设备/标注/文字分别放到清晰图层;块名、图层名、文字标注要可检索。不要在没有用户确认的情况下覆盖已有 DWG。
执行天正命令
通过 manage_tianzheng 的 run_command 执行低风险命令:
[{"action":"run_command","command":"_ABOUT","timeout_sec":10}]
如果返回 Command is still active or waiting for user input,说明命令大概率需要人工点选、输入或对话框确认。不要继续盲目发送回车或坐标,先报告需要人工交互。
排障顺序
manage_session连接失败:确认 AutoCAD 2026 路径存在,再看AutoCAD.Application.25.1是否可用。不要混用旧版 AutoCAD ProgID。probe显示tangent_root_exists=false或 ARX 文件不存在:确认TIANZHENG_ROOT指向正确的天正暖通安装目录。CodexAutomation下没有天正SupportPath/TRUSTEDPATHS是预期状态;只有用户手动打开天正THvac30V1时才应看到天正路径。- ARX 加载失败:确认文件在
TIANZHENG_ROOT\SYS25x64下,再用load_arx单独加载具体路径。 - Codex 看不到 MCP 工具:先确认设置页 "From plugins" 里有
autocad_tianzheng,再重启 Codex,让新环境变量和缓存插件重新加载。
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.