软件
- 作者仓库星标 20
- 作者仓库 claude-engineering-skills
- 领域
- 设计与多媒体
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 85 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Soljourner · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。;上游仓库已 211 天未更新,可能与最新智能体行为不一致。
# SolidWorks CAD Integration
This skill provides guidance for automating parametric pump impeller design and other mechanical component modeling using the SolidWorks API.
## Overview of SolidWorks API
SolidWorks provides a comprehensive API that allows users to automate design tasks, create parametric models, manipulate assemblies, and generate drawings programmatically. The API exposes the full functionality of SolidWorks through COM interfaces, enabling external applications to control SolidWorks and access its features.
Key capabilities:
- Parametric part and assembly creation
- Feature manipulation and dimension control
- Sketch creation and editing
- Drawing automation and annotation
- File import/export operations
- Simulation and analysis integration
- Bill of materials (BOM) generation
## Licensing Requirements
**Important**: SolidWorks API access requires:
1. **Valid SolidWorks License**: A full SolidWorks license is required to use the API. The API cannot be used with viewer-only licenses.
2. **License Types**:
- SolidWorks Standard, Professional, or Premium
- Network (concurrent) or standalone licenses both support API access
- SolidWorks PDM integration requires additional PDM licenses
3. **Windows Platform**: SolidWorks and its API are Windows-only. The API utilizes COM/ActiveX technology specific to Windows.
4. **Version Compatibility**: Ensure your API code matches your SolidWorks version. API methods may vary between versions.
## API Access Methods
### 1. VBA Macros
VBA (Visual Basic for Applications) is the built-in scripting environment in SolidWorks.
**Advantages**:
- Native integration with SolidWorks
- No external dependencies
- Easy to debug within SolidWorks
- Direct access to UI elements
**Use Cases**:
- Quick automation scripts
- User interaction through forms
- Prototyping API workflows
**Access**: Tools > Macro > New or Edit in SolidWorks
### 2. Python (via win32com)
Python can control SolidWorks through the `win32com` package (pywin32).
**Advantages**:
- Modern, readable syntax
- Extensive Python ecosystem for data processing
- Integration with scientific libraries (NumPy, pandas)
- Easier to version control and test
**Requirements**:
```bash
pip install pywin32
```
**Use Cases**:
- Batch processing of parts
- Data-driven design automation
- Integration with engineering calculations
- Export/import workflows
### 3. C# .NET
C# provides strong typing and robust development tools for SolidWorks automation.
**Advantages**:
- Best performance
- Strong typing and IntelliSense support
- Comprehensive error handling
- Professional application development
**Requirements**:
- Visual Studio
- SolidWorks Interop Assemblies (installed with SolidWorks)
**Use Cases**:
- Custom SolidWorks add-ins
- Enterprise integration applications
- Complex automation workflows
- Standalone applications controlling SolidWorks
## Common Tasks
### Parametric Part Creation
Create parts with dimensions that can be modified programmatically:
- Define sketches with dimensional constraints
- Create features (extrude, revolve, sweep, loft)
- Add relations between features
- Set global variables and equations
### Impeller Blade Geometry
Specialized tasks for pump impeller design:
- **Blade Profile Generation**: Create complex 3D curves for blade profiles
- **Swept Features**: Use guide curves and profiles to create blade surfaces
- **Circular Patterns**: Array blades around the central axis
- **Hub and Shroud Modeling**: Create the central hub and outer shroud geometries
- **Fillet Operations**: Add fillets for manufacturing and performance optimization
- **Parametric Control**: Link blade angles, thickness, and count to design variables
### Assembly Automation
Automate assembly creation and modification:
- Insert components into assemblies
- Apply mates (coincident, concentric, distance, angle)
- Create patterns of components
- Detect interferences
- Manage assembly configurations
### Drawing Generation
Automatically create and populate engineering drawings:
- Create drawing sheets from templates
- Insert model views (standard, section, detail)
- Add dimensions and annotations
- Generate BOMs and balloons
- Export to PDF or DWG
### File Export
Export SolidWorks models to neutral formats:
- **STEP (ISO 10303)**: Industry-standard for CAD data exchange
- **IGES**: Legacy format, widely supported
- **Parasolid**: High-fidelity geometry transfer
- **STL**: For 3D printing and mesh-based analysis
- **DXF/DWG**: 2D drawing export for manufacturing
## Best Practices
1. **Error Handling**: Always implement robust error handling as API operations can fail
2. **Version Control**: Keep API code separate from CAD files for better version control
3. **Documentation**: Document units, coordinate systems, and design intent
4. **Testing**: Test API scripts on simple models before applying to complex designs
5. **Performance**: Suppress screen updates and rebuild operations for better performance
6. **Cleanup**: Always release COM objects properly to avoid memory leaks
## Learning Resources
- **SolidWorks API Help**: Access from Help > API Help in SolidWorks
- **API SDK**: Includes examples and documentation (installed with SolidWorks)
- **Online Community**: SolidWorks Forums and user groups
- **Sample Code**: Available in SolidWorks installation directory
## Limitations and Considerations
- **Platform**: Windows-only, no macOS or Linux support
- **Performance**: Complex operations may be slow; consider batch processing during off-hours
- **Licensing**: Requires active SolidWorks session (consumes a license)
- **Version Dependencies**: API changes between SolidWorks versions may break scripts
- **COM Complexity**: Understanding COM object model is essential for advanced use
## Integration with Engineering Workflow
The SolidWorks API is particularly valuable for:
- **Design Optimization**: Parametric studies with multiple design variants
- **CFD Preprocessing**: Automated geometry preparation for OpenFOAM or ANSYS
- **Manufacturing**: Automated drawing generation and BOM creation
- **Product Configurators**: Customer-driven product customization
- **Data Management**: Integration with PLM/PDM systems
章节与文件索引
按说明文件中的顺序排列。
SolidWorks API 概述
许可要求
1.VBA宏
2.Python(来自win32com)
3.C.NET
文件/命令 -> win32com · import/export · COM/ActiveX · Export/import · DXF/DWG · PLM/PDM
内容校验值 -> 3a1437c0e8cf
当前原文的自动摘译,尚未人工审校。
SolidWorks API 概述
SolidWorks 提供了全面的 API,允许用户以编程方式自动执行设计任务、创建参数化模型、操作装配体以及生成工程图。 API 通过 COM 接口公开 SolidWorks 的全部功能,使外部应用程序能够控制 SolidWorks 并访问其功能。主要功能:参数化零件和装配体创建 特征操作和尺寸控制
许可要求
重要提示:SolidWorks API 访问需要: 有效的 SolidWorks 许可证:需要完整的 SolidWorks 许可证才能使用 API。该 API 不能与仅限查看者的许可证一起使用。许可证类型:SolidWorks Standard、Professional 或 Premium 网络(并发)或独立许可证均支持 API 访问
1.VBA宏
VBA(Visual Basic for Applications)是 SolidWorks 中的内置脚本环境。优点: 与 SolidWorks 原生集成 无外部依赖性 在 SolidWorks 中易于调试
2.Python(来自win32com)
Python可以通过
win32com包(pywin32)控制SolidWorks。优点: 现代、可读的语法 用于数据处理的广泛 Python 生态系统 与科学库(NumPy、pandas)集成3.C.NET
C# 为 SolidWorks 自动化提供了强大的类型和强大的开发工具。优点: 最佳性能 强类型和 IntelliSense 支持 全面的错误处理