set_spice_model#
- Modeler3DLayout.set_spice_model(assignment: str, input_file: str | Path, model_name: str | None = None, subcircuit_name: str | None = None, pin_map: list | None = None) bool#
Assign a Spice model to a component.
- Parameters:
- assignment
str Name of the component.
- input_file
strorpathlib.Path Full path to the model file.
- model_name
str,optional Name of the model. The default is
None, in which case the model name is the file name without an extension.- subcircuit_name
str,optional Name of the subcircuit. The default is
None, in which case the subcircuit name is the model name.- pin_map
list,optional List of
[spice_pin_name, aedt_pin_name]to customize the pin mapping between Spice pins and AEDT pins.
- assignment
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from ansys.aedt.core import Hfss3dLayout >>> h3d = Hfss3dLayout("myproject") >>> h3d.modeler.set_spice_model(assignment="A1", input_file="myfile", subcircuit_name="SUBCK1")