CATIA Macro Development Assistant
Paste the following prompt into your AI chat to install this skill:
Please install @user_cf90b6c5/catia-marco according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem It Solves
CATIA V5/V6 macros are often hard to maintain because CATScript, VBScript, and VBA have different syntax limits, and CATIA automation interfaces are large and framework-specific. Small details such as collection iteration, error handling, string formatting, and drawing coordinate behavior can fail only at runtime.
How The Skill Works
This skill defaults to CATScript and generates code that avoids known engine failures:
- Default target: prefer
CATScriptunlessVBScriptorVBAis explicitly required. - Hard-limit checks: avoid cross-block
GoTo,For Eachover CATIA collections,Next i,Format(), typedDim, andOn Error GoTo label. - API lookup: locate interfaces in
references/interfaces/byinterface_, method name, or framework file. - Example reuse: adapt Drafting and 2D Layout examples from
references/macros/_all_examples.txt.
Boundaries And Caveats
Use it for automating drawing views, dimensions, tables, and component instantiation. Note that CATIA object behavior can differ from general VBScript assumptions: DrawingComponent.GetRealColor() is unreliable, paper dimensions should be read at runtime, and view coordinates must include Component.x and Component.y for absolute sheet position.
Use Cases
- Generate batch drawing-view macros for CATIA while enforcing safe `CATScript` iteration and coordinate logic
- Fix runtime macro errors by replacing forbidden `For Each`, `Next i`, and `Format()` patterns
- Build drawing tables, dimensions, or 2D component instances by searching `interface` files and macro examples
- Migrate VBScript logic to CATScript by adjusting typed declarations, error handling, and string formatting
Best For
- CAE or programming engineers developing CATIA V5/V6 macros who need to write and debug automation scripts
- CAD engineers maintaining batch drawing scripts who need to iterate views, components, dimensions, and tables
- software engineers migrating CAD automation scripts from VBScript to CATScript
- developers who need to locate CAD APIs by searching `interface` reference files
Related Skills
A QQ bot messaging framework based on qq-botpy, covering guild, C2C, and group message flows, scheduled pushes, and troubleshooting.
Explains how to calculate N+1 severance, including service-year rounding, monthly wage base, caps, taxes, and notice pay.
Takes a name input and returns a simple hello greeting.
A BPU quantization tool for Horizon RDK S100 that handles PyTorch/ONNX calibration, stride alignment, post-processing, and board-side validation.