Get API Enum
get_api_enumLook up SolidWorks API enum members and their integer values when a call requires an enum, such as a unit system or user preference, instead of guessing the number. Accepts an enum or member name, case-insensitive.
Instructions
Look up a SolidWorks API enum's members and their integer values.
Use this when a call takes an enum value, such as a unit system or a
user preference, instead of guessing the number: the values aren't in
the API help pages. Give the enum (swUnitSystem_e) or one of its
members (swUnitSystem_IPS); a member's name returns its whole
enum with matched_member set. Names match regardless of case. The
values come from SolidWorks' constants type library installed on this
machine.
Setup: none. SolidWorks must be installed, not running; it is never
contacted. Read-only. The first lookup builds the index (about a
second) and later ones reuse it. index_status is ready,
rebuilt or unavailable.
Returns result with enum, description and members
(name and value in declaration order). result.found false
means there's no such enum or member, or no index could be built;
result.note says which.
Example input: {"name": "swUnitSystem_e"}
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": "get_api_enum"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_data | No | The enum. `name` (an enum or member name) is required; `year` has a default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||