AI Agent Hub
Back to skills
CATIA Macro Development Assistant icon

CATIA Macro Development Assistant

Development Updated 2026.08.29

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 CATScript unless VBScript or VBA is explicitly required.
  • Hard-limit checks: avoid cross-block GoTo, For Each over CATIA collections, Next i, Format(), typed Dim, and On Error GoTo label.
  • API lookup: locate interfaces in references/interfaces/ by interface_, 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