Look Up API Method
lookup_api_methodLook up SolidWorks API methods and properties in the installed type library to verify parameters, return types, and descriptions before writing or debugging VBA, macro, or COM calls.
Instructions
Look up one SolidWorks API method or property: parameters, return type, description.
Use this before writing or debugging a SolidWorks API call (VBA, a macro or COM) to check that the member exists on that interface and how to call it. Answers come from the SolidWorks type library installed on this machine, so they match the installed version.
Setup: none. SolidWorks must be installed, not running; it is never
contacted. Read-only. The first lookup builds the index (about a
second). index_status is ready, rebuilt or
unavailable.
Names match regardless of case, as COM does. result.member is
SolidWorks' own spelling, with a note when yours differs. Each
parameter has a type and a direction: in, out
(SolidWorks fills it) or in_out (pass a variable by reference).
return_type is null when the method returns nothing; a property
has its value type there and an access. result.found false
means there is no such member, and result.note says why,
including when no index could be built (SolidWorks isn't installed
here, or the requested year isn't).
Example input: {"interface": "ISldWorks", "method": "OpenDoc6"}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "lookup_api_method"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_data | No | The member to look up. `interface` (e.g. "ISldWorks") and `method` (a method or property name) are required; `year` has a default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||