Xpersona
C

CAD批量处理

CLAWHUB · Unverified

提供CAD文件批量读取、文字替换、图层重命名、块属性修改和图纸自动生成等室内设计自动化处理功能。 Skill: CAD批量处理 Owner: 137984917-cyber Summary: 提供CAD文件批量读取、文字替换、图层重命名、块属性修改和图纸自动生成等室内设计自动化处理功能。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-14T08:30:01.253Z | user 室内设计CAD图纸批量处理工具 Archive index: Archive v1.0.0: 7 files, 10485 bytes Files: batch_export.py (5616b), batch_modify.py (5970b), cad_utils.py (4589b), generate_dwg.py (5418b), skill-card.md (2505b), SKILL.md (2603b), _meta.json (139b) File v1.0.0:SKIL

62
Rank
84
Safety
1.7k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1790hfws72axnnhfbnfe3gkb183j1qr:cad-batch-processing
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-137984917-cyber-cad-batch-processing/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

4,703 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

# CAD批量处理 - AutoCAD自动化工具

## 功能

满足室内设计师对CAD图纸批量处理需求:

### 1. 📥 读取/解析DWG/DXF
- 提取图层信息(名称/颜色/线型)
- 提取所有文字坐标内容
- 提取块和块属性
- 提取线段坐标
- 输出JSON格式方便后续处理

### 2. ✏️ 批量修改
- **批量文字替换**:文件夹内所有DXF替换指定文字(比如改项目名称、图框信息)
- **重命名图层**:批量修改图层名称
- **修改块属性**:修改图框块的属性值(项目名称、日期等)
- **修改图层颜色**:批量调整图层颜色

### 3. 📐 生成DXF
- 按指令添加墙线(支持指定厚度)
- 添加窗户
- 添加门(带开启弧线)
- 添加尺寸标注
- 添加文字标注
- 自动生成平面/立面DXF,可直接在AutoCAD打开编辑

### 4. 📦 批量处理
- **批量重命名**:按前缀+序号批量重命名
- **自动备份**:整个项目文件夹备份CAD文件
- **PDF添加水印**:给导出的PDF批量添加工作室水印
- **批量导出PDF**:框架已搭,可适配本地CAD命令行导出

## 安装依赖

```bash
pip install ezdxf
# 如果需要PDF水印功能,额外安装:
pip install PyPDF2 reportlab
```

## 使用方法

### 提取信息
```bash
# 提取所有信息到JSON
python cad_utils.py input.dxf output.json
```

### 批量修改
```bash
# 批量替换文字(整个文件夹)
python batch_modify.py text ./project "旧项目名" "新项目名"

# 重命名图层
python batch_modify.py layer drawing.dxf "旧层名" "新层名"

# 修改块属性
python batch_modify.py attr drawing.dxf "TitleBlock" "ProjectName" "新项目名称"

# 修改图层颜色
python batch_modify.py color drawing.dxf "WALL" 7
```

### 生成图纸
```python
from generate_dwg import CADGenerator
gen = CADGenerator()
# 添加外墙
gen.add_wall((0, 0), (6000, 0), 240)
gen.add_wall((0, 0), (0, 4000), 240)
# 添加窗
gen.add_window((2000, 4000), 2000)
# 添加门
gen.add_door((120, 1500), 900)
# 保存
gen.save("output.dxf")
```

### 批量处理
```bash
# 批量重命名
python batch_export.py rename ./dwg "项目名-" 1

# 自动备份
python batch_export.py backup ./项目 ./项目_backup

# PDF添加水印
python batch_export.py watermark input.pdf output.pdf "温州隐室空间设计"
```

## 适用场景

- 项目改名批量改图框文字
- 新项目快速生成基础平面
- 批量导出PDF给客户
- 项目归档自动备份重命名
- 整理图纸统一图层规范

## 作者

温州隐室空间设计 · 数字化项目部(铁臂)

_meta.json

{
  "ownerId": "kn7eqk88jv25x3qgpb24vxd6zd83kgrm",
  "slug": "cad-batch-processing",
  "version": "1.0.0",
  "publishedAt": 1776155401253
}

skill-card.md

## Description:

Provides CAD batch-processing support for reading DXF content, replacing drawing text, renaming layers, editing block attributes, changing layer colors, generating simple DXF plans, backing up CAD projects, renaming CAD files, and watermarking PDFs.

This skill is ready for commercial/non-commercial use.

## Publisher:

[137984917-cyber](https://clawhub.ai/user/137984917-cyber)

### License/Terms of Use:

MIT-0

## Use Case:

Interior design teams and CAD automation users can use this skill to inspect DXF drawings, apply repeated project-name or standards updates across drawings, generate simple plan geometry, and prepare project files for handoff or archiving.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Bulk modify and rename operations can change many CAD files in place.

Mitigation: Run the skill only on copied project folders or verified backups, and confirm target folders and replacement values before execution.

Risk: Backup destinations placed inside the source project can mix copies with originals or expand the backup scope.

Mitigation: Choose a backup destination outside the source folder and verify the resulting archive before deleting or overwriting originals.

Risk: Unpinned Python dependencies can produce different behavior across environments.

Mitigation: Use a virtual environment and pin required packages such as ezdxf, PyPDF2, and reportlab before using the scripts on valuable CAD projects.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/137984917-cyber/skills/cad-batch-processing)
- [Publisher profile](https://clawhub.ai/user/137984917-cyber)
- [Artifact skill documentation](artifact/SKILL.md)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with Python examples and shell commands; scripts may produce JSON, DXF, PDF, or renamed/copied files when executed.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Outputs can include in-place file changes, copied backup files, generated DXF drawings, extracted JSON metadata, and watermarked PDFs.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to CAD批量处理 and adjacent AI workflows.