Generate VBA: Macro Recorder
generate_vba_macro_recorderGenerates a VBA macro skeleton to fill in or instructions for starting and stopping SolidWorks' built-in macro recorder. Returns code text only; nothing runs in SolidWorks.
Instructions
Write a VBA starting point: a macro skeleton to fill in, or a note on starting and stopping SolidWorks' macro recorder.
Use "create_template" for an empty macro with the usual SolidWorks setup.
Recording itself is done in SolidWorks (Tools > Macro > Record). The macro comes
back as text for the SolidWorks VBA editor (Alt+F11); execute_macro runs only
binary .swp files, so it can't run this directly. Read-only. Nothing runs in
SolidWorks. Returns: vba_code, the parameters used and usage_instructions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_data": "<input_data>"
},
"name": "generate_vba_macro_recorder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_data | Yes | A mapping with `operation`: "start_recording" (the default), "stop_recording" or "create_template" (with `macro_name`). Any other operation is refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||