sim_attach_model
Attach a locally saved vendor SPICE model file (.mdl/.ckt/.lib) to a component by specifying its designator and exact subcircuit or model name.
Instructions
Attach an external SPICE model file (.mdl / .ckt / .lib) to a component.
Use this after fetching a vendor SPICE model file from the
manufacturer and saving it locally. The model_name parameter
must be the exact .SUBCKT <name> declaration from inside
the file, not the file name.
Args:
designator: Component reference (e.g. "U1").
file_path: Full path to the locally-saved .mdl / .ckt / .lib.
model_name: Subcircuit / model name declared inside the
file. Open the file and look for .SUBCKT <name>
or .MODEL <name>.
primitive: SPICE prefix letter. Default "X" (subcircuit).
Use "D"/"Q"/"M" when the file declares a .MODEL of
that kind instead of a subcircuit.
Returns: Dict with success, designator, file_path, model_name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| primitive | No | X | |
| designator | Yes | ||
| model_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||