Solidworks Automationのロゴ

Solidworks Automation

コミュニティ
delancy827
solidworks-automation

用户需要用 Python/C#/VBA 连接 SolidWorks API 自动建模、装配、工程图、仿真等时调用本技能。

概要

公開者delancy827
リポジトリsolidworks-skills
スキル名solidworks-automation
スター
150
フォーク
15
同梱ファイル
13
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 13個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    delancy827がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Solidworks Automation」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/delancy827/solidworks-skills/tree/main/solidworks-automation
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/delancy827/solidworks-skills.git /tmp/solidworks-skills
mkdir -p .claude/skills
cp -r /tmp/solidworks-skills/solidworks-automation .claude/skills/solidworks-automation
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSolidworks Automationを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSolidworks Automationを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Solidworks Automationは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

SolidWorks Automation

Use this skill when the task requires executable SolidWorks automation code or a live COM session for parts, assemblies, drawings, Simulation, Flow Simulation, sheet metal, weldments, molds, or tooling. For design-only decisions or parameterization methodology without implementation, use sw-designer instead.

Operating rules

  • Reuse an active SolidWorks instance with GetActiveObject("SldWorks.Application"); only fall back to Dispatch when no usable instance exists.
  • Reuse sw.ActiveDoc when it matches the task. Create a new document only when explicitly required or no suitable document exists.
  • Wrap temporary documents in try...finally and close them by title; do not leave orphan windows or COM references.
  • Treat units as meters inside the API. Keep user-facing dimensions in millimeters and convert explicitly.
  • Before any mutation, capture a geometry fingerprint: feature count, body count, bbox, volume, and relevant dimensions.
  • After each mutation, force a rebuild, re-read the fingerprint, and assert the expected change. Do not report success from a return value alone.
  • If an assertion fails, stop the current strategy, print the traceback and current feature-tree state, and propose a concrete fallback. Do not silently catch the failure.
  • Do not guess API names, argument counts, or COM null handling. Probe the live object with dir(), get_com_member, or a tiny subprocess before using an uncertain API.
  • Keep real project files and generated models under F:\codexspace\...; do not copy full projects to the Desktop or C drive.

Recommended workflow

  1. Preflight capability. State whether the current runtime can inspect images/PDFs and whether SolidWorks is available. For drawing-driven work, identify the drawing source and who or what performed visual verification.
  2. Build a dimension ledger. Separate exact, inferred, designer-choice, and unsupported dimensions. Bounding-box matching is not sufficient; account for recesses, lands, grooves, PCD holes, chamfers, and secondary features.
  3. Choose an execution channel.
    • Prefer Python COM for connection, sketching, additive extrudes, measurements, and file I/O.
    • Prefer one sketch with outer and inner closed loops plus FeatureExtrusion2 for through holes and rings.
    • Use C# or a generated VBA macro for methods that Python COM cannot call reliably, especially complex cut features with more than 12 parameters.
  4. Implement in the project workspace. Keep builder code modular, parameter-driven, and testable without loading the full manual.
  5. Execute and validate. Compile the script first. If SolidWorks is available, run it, force a rebuild, then assert feature/body counts, bbox, volume, and output-file existence. Use screenshots or rendered views when geometry intent matters.
  6. Report truthfully. Distinguish completed geometry, markers-only holes, approximations, and unsupported features. Never describe an uncut marker as a through hole.

Known SW 2024 COM shortcuts

  • SelectByID2 has 9 arguments; the Callout argument must be a real COM null variant, typically VARIANT(VT_DISPATCH, None).
  • FeatureExtrusion2 uses 23 arguments on this install.
  • EditRebuild3 may be a property instead of a method. ForceRebuild3(False) is the safer rebuild call.
  • FeatureCut, FeatureCut3, and FeatureCut4 are fragile from Python COM. Use additive geometry, multi-contour sketches, C#, or VBA rather than pretending a None return means success.
  • LoadFile4 may return (doc, status); unwrap it before using the document.
  • Extension.SaveAs needs COM variants for export data and by-ref error/warning values.
  • For assemblies, preload components, insert at process coordinates, then mate using stable named entities or SelectByRay; verify BOM count and envelope before attempting perfect mates.

References

Read these only when the current task needs them.

  • references/automation-manual.md — the full 46-section manual. Search it first with rg -n "keyword" references/automation-manual.md, then read the narrow line range. Avoid loading the whole file by default.
  • references/drawing-to-3d-lessons.md — DXF/PDF-to-part rules, secondary-feature checks, volume calibration, and ground-truth STEP comparison.
  • references/materials-forming-mold-lessons.md — stamping edge sizing, die-cast shrink direction, process metadata, moldbase checks, and mold assembly QA.
  • references/assembly-debugging-lessons.md — repeated-instance counting, transformed hole centers, and render-based assembly validation.
  • references/com-dualinterface-quirks.md — COM 双接口怪癖实证手册(2026-10 单机全流程实战沉淀)。当动态 COM 调用报"找不到成员"、拉伸静默返回 None、AddComponent5 静默失败、ComposeTransform 摆位不对、截图视图切不过去时,先读它。配套可运行流水线见 examples/verified/。
  • examples/01_basic_part.py
  • examples/02_assembly.py
  • examples/03_drawing.py
  • examples/04_simulation.py

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Solidworks Automation」では何ができますか?

用户需要用 Python/C#/VBA 连接 SolidWorks API 自动建模、装配、工程图、仿真等时调用本技能。

TypingMindでSolidworks Automationを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Solidworks Automationはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSolidworks Automationをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/delancy827/solidworks-skills/tree/main/solidworks-automationを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Solidworks Automationを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Solidworks Automationで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSolidworks Automationを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Solidworks Automation」は無料ですか?

はい。delancy827がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇