api_cast
Cast a KOMPAS-3D object handle to a different SDK interface to access additional methods. Reports COM failure if the object lacks support.
Instructions
QueryInterface to an additional installed SDK interface, e.g. IPart7 to IModelContainer.
A known type does not guarantee that a given object supports it. COM failure is reported.
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": {
"handle": "<handle>",
"interface": "<interface>"
},
"name": "api_cast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| handle | Yes | ||
| library | No | kAPI7 | |
| interface | Yes |